├── README.md
├── day01
├── README.md
└── main.py
├── day02
├── README.md
└── main.py
├── day03
├── README.md
└── main.py
├── day04
├── README.md
└── main.py
├── day05
├── README.md
└── main.py
├── day06
├── README.md
└── main.py
├── day07
├── README.md
├── hangman_art.py
├── hangman_words.py
└── main.py
├── day08
├── README.md
├── art.py
└── main.py
├── day09
├── README.md
├── art.py
└── main.py
├── day10
├── README.md
├── art.py
└── main.py
├── day100
├── NLSY97_Variable_Names_and_Descriptions.csv
├── NLSY97_subset.csv
├── README.md
└── day100.ipynb
├── day11
├── README.md
├── art.py
└── main.py
├── day12
├── README.md
├── art.py
└── main.py
├── day13
├── Exercise 1 - Debugging Odd or Even
│ ├── README.md
│ └── main.py
├── Exercise 2 - Debugging Leap Year
│ ├── README.md
│ └── main.py
├── Exercise 3 - Debugging FizzBuzz
│ ├── README.md
│ └── main.py
└── README.md
├── day14
├── README.md
├── art.py
├── game_data.py
└── main.py
├── day15
├── Coffee Machine Program Requirements.pdf
├── README.md
└── main.py
├── day16
├── Coffee Machine Classes Documentation.pdf
├── Coffee Machine Program Requirements.pdf
├── README.md
├── coffee_maker.py
├── main.py
├── menu.py
└── money_machine.py
├── day17
├── README.md
├── data.py
├── main.py
├── question_model.py
└── quiz_brain.py
├── day18
├── README.md
└── main.py
├── day19
├── README.md
└── main.py
├── day20
├── README.md
├── main.py
└── snake.py
├── day21
├── README.md
├── food.py
├── main.py
├── scoreboard.py
└── snake.py
├── day22
├── README.md
├── ball.py
├── main.py
├── paddle.py
└── scoreboard.py
├── day23
├── README.md
├── car_manager.py
├── main.py
├── player.py
└── scoreboard.py
├── day24
├── README.md
├── mail_merge
│ ├── Input
│ │ ├── Letters
│ │ │ └── starting_letter.txt
│ │ └── Names
│ │ │ └── invited_names.txt
│ ├── Output
│ │ └── ReadyToSend
│ │ │ ├── example.txt
│ │ │ ├── letter_for_Aang.txt
│ │ │ ├── letter_for_Appa.txt
│ │ │ ├── letter_for_Katara.txt
│ │ │ ├── letter_for_Momo.txt
│ │ │ ├── letter_for_Sokka.txt
│ │ │ ├── letter_for_Toph.txt
│ │ │ ├── letter_for_Uncle Iroh.txt
│ │ │ └── letter_for_Zuko.txt
│ └── main.py
└── snake_game
│ ├── data.txt
│ ├── food.py
│ ├── main.py
│ ├── scoreboard.py
│ └── snake.py
├── day25
├── 50_states.csv
├── README.md
├── blank_states_img.gif
├── main.py
└── states_to_learn.csv
├── day26
├── README.md
├── main.py
└── nato_phonetic_alphabet.csv
├── day27
├── README.md
└── main.py
├── day28
├── README.md
├── main.py
└── tomato.png
├── day29
├── README.md
├── data.txt
├── logo.png
└── main.py
├── day30
├── README.md
├── data.json
├── logo.png
└── main.py
├── day31
├── README.md
├── data
│ ├── french_words.csv
│ └── words_to_learn.csv
├── images
│ ├── card_back.png
│ ├── card_front.png
│ ├── right.png
│ └── wrong.png
└── main.py
├── day32
├── README.md
├── birthdays.csv
├── letter_templates
│ ├── letter_1.txt
│ ├── letter_2.txt
│ └── letter_3.txt
└── main.py
├── day33
├── README.md
└── main.py
├── day34
├── README.md
├── data.py
├── images
│ ├── false.png
│ └── true.png
├── main.py
├── question_model.py
├── quiz_brain.py
└── ui.py
├── day35
├── README.md
└── main.py
├── day36
├── README.md
└── main.py
├── day37
├── README.md
└── main.py
├── day38
├── README.md
└── main.py
├── day39
├── README.md
├── data_manager.py
├── flight_data.py
├── flight_search.py
├── main.py
└── notification_manager.py
├── day40
├── README.md
├── data_manager.py
├── flight_data.py
├── flight_search.py
├── main.py
└── notification_manager.py
├── day41
├── README.md
├── contact.html
├── hobbies.html
├── index.html
└── profile pic.png
├── day42
├── README.md
├── contact.html
├── hobbies.html
└── index.html
├── day43
├── README.md
├── contact.html
├── css
│ └── styles.css
├── hobbies.html
├── index.html
└── profile pic.png
├── day44
├── README.md
├── css
│ └── styles.css
├── favicon.ico
├── images
│ ├── chillies.png
│ ├── cloud.png
│ ├── mountain.png
│ └── profile pic.png
└── index.html
├── day45
├── README.md
├── main.py
└── movies.txt
├── day46
├── README.md
└── main.py
├── day47
├── README.md
└── main.py
├── day48
├── README.md
└── main.py
├── day49
├── README.md
└── main.py
├── day50
├── README.md
└── main.py
├── day51
├── README.md
└── main.py
├── day52
├── README.md
└── main.py
├── day53
├── README.md
└── main.py
├── day54
├── README.md
├── hello.py
└── main.py
├── day55
├── README.md
└── main.py
├── day56
├── README.md
├── server.py
├── static
│ ├── assets
│ │ ├── css
│ │ │ ├── font-awesome.min.css
│ │ │ ├── ie8.css
│ │ │ ├── ie9.css
│ │ │ ├── images
│ │ │ │ └── overlay.png
│ │ │ ├── main.css
│ │ │ └── noscript.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ ├── js
│ │ │ ├── PIE.htc
│ │ │ ├── html5shiv.js
│ │ │ └── respond.min.js
│ │ └── sass
│ │ │ ├── base
│ │ │ ├── _page.scss
│ │ │ └── _typography.scss
│ │ │ ├── components
│ │ │ ├── _button.scss
│ │ │ ├── _form.scss
│ │ │ ├── _icon.scss
│ │ │ └── _list.scss
│ │ │ ├── ie8.scss
│ │ │ ├── ie9.scss
│ │ │ ├── layout
│ │ │ ├── _footer.scss
│ │ │ ├── _main.scss
│ │ │ └── _wrapper.scss
│ │ │ ├── libs
│ │ │ ├── _functions.scss
│ │ │ ├── _mixins.scss
│ │ │ ├── _skel.scss
│ │ │ └── _vars.scss
│ │ │ ├── main.scss
│ │ │ └── noscript.scss
│ └── images
│ │ ├── avatar.png
│ │ └── bg.jpg
└── templates
│ └── index.html
├── day57
├── README.md
├── main.py
├── post.py
├── static
│ └── css
│ │ └── styles.css
└── templates
│ ├── index.html
│ ├── post.html
│ ├── post2.html
│ └── post3.html
├── day58
├── README.md
├── css
│ └── styles.css
├── images
│ ├── TechCrunch.png
│ ├── bizinsider.png
│ ├── dog-img.jpg
│ ├── iphone6.png
│ ├── lady-img.jpg
│ ├── mashable.png
│ └── tnw.png
└── index.html
├── day59
├── README.md
├── main.py
├── static
│ ├── assets
│ │ ├── favicon.ico
│ │ └── img
│ │ │ ├── about-bg.jpg
│ │ │ ├── contact-bg.jpg
│ │ │ ├── home-bg.jpg
│ │ │ ├── post-bg.jpg
│ │ │ └── post-sample-image.jpg
│ ├── css
│ │ └── styles.css
│ └── js
│ │ └── scripts.js
└── templates
│ ├── about.html
│ ├── contact.html
│ ├── footer.html
│ ├── header.html
│ ├── index.html
│ └── post.html
├── day60
├── README.md
├── main.py
├── static
│ ├── assets
│ │ ├── favicon.ico
│ │ └── img
│ │ │ ├── about-bg.jpg
│ │ │ ├── contact-bg.jpg
│ │ │ ├── home-bg.jpg
│ │ │ ├── post-bg.jpg
│ │ │ └── post-sample-image.jpg
│ ├── css
│ │ └── styles.css
│ └── js
│ │ └── scripts.js
└── templates
│ ├── about.html
│ ├── contact.html
│ ├── footer.html
│ ├── header.html
│ ├── index.html
│ └── post.html
├── day61
├── README.md
├── main.py
├── poetry.lock
├── pyproject.toml
├── requirements.txt
└── templates
│ ├── base.html
│ ├── denied.html
│ ├── index.html
│ ├── login.html
│ └── success.html
├── day62
├── README.md
├── cafe-data.csv
├── main.py
├── requirements.txt
├── static
│ └── css
│ │ └── styles.css
└── templates
│ ├── add.html
│ ├── cafes.html
│ └── index.html
├── day63
├── README.md
├── main.py
└── templates
│ ├── add.html
│ ├── edit_rating.html
│ └── index.html
├── day64
├── README.md
├── main.py
├── static
│ └── css
│ │ └── styles.css
└── templates
│ ├── add.html
│ ├── edit.html
│ ├── index.html
│ └── select.html
├── day65
└── README.md
├── day66
├── README.md
├── cafes.db
├── main.py
└── templates
│ └── index.html
├── day67
├── README.md
├── main.py
├── posts.db
├── static
│ ├── css
│ │ ├── clean-blog.css
│ │ └── clean-blog.min.css
│ ├── img
│ │ ├── about-bg.jpg
│ │ ├── contact-bg.jpg
│ │ └── edit-bg.jpg
│ ├── js
│ │ ├── clean-blog.js
│ │ ├── clean-blog.min.js
│ │ ├── contact_me.js
│ │ └── jqBootstrapValidation.js
│ ├── scss
│ │ ├── _bootstrap-overrides.scss
│ │ ├── _contact.scss
│ │ ├── _footer.scss
│ │ ├── _global.scss
│ │ ├── _masthead.scss
│ │ ├── _mixins.scss
│ │ ├── _navbar.scss
│ │ ├── _post.scss
│ │ ├── _variables.scss
│ │ └── clean-blog.scss
│ └── vendor
│ │ ├── bootstrap
│ │ ├── css
│ │ │ ├── bootstrap-grid.css
│ │ │ ├── bootstrap-grid.css.map
│ │ │ ├── bootstrap-grid.min.css
│ │ │ ├── bootstrap-grid.min.css.map
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── bootstrap-reboot.css.map
│ │ │ ├── bootstrap-reboot.min.css
│ │ │ ├── bootstrap-reboot.min.css.map
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ └── bootstrap.min.css.map
│ │ └── js
│ │ │ ├── bootstrap.bundle.js
│ │ │ ├── bootstrap.bundle.js.map
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.js.map
│ │ │ ├── bootstrap.min.js
│ │ │ └── bootstrap.min.js.map
│ │ ├── fontawesome-free
│ │ ├── css
│ │ │ ├── all.css
│ │ │ ├── all.min.css
│ │ │ ├── brands.css
│ │ │ ├── brands.min.css
│ │ │ ├── fontawesome.css
│ │ │ ├── fontawesome.min.css
│ │ │ ├── regular.css
│ │ │ ├── regular.min.css
│ │ │ ├── solid.css
│ │ │ ├── solid.min.css
│ │ │ ├── svg-with-js.css
│ │ │ ├── svg-with-js.min.css
│ │ │ ├── v4-shims.css
│ │ │ └── v4-shims.min.css
│ │ └── webfonts
│ │ │ ├── fa-brands-400.eot
│ │ │ ├── fa-brands-400.svg
│ │ │ ├── fa-brands-400.woff
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.svg
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-regular-400.woff
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-solid-900.eot
│ │ │ ├── fa-solid-900.svg
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-solid-900.woff
│ │ │ └── fa-solid-900.woff2
│ │ └── jquery
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ ├── jquery.min.map
│ │ ├── jquery.slim.js
│ │ ├── jquery.slim.min.js
│ │ └── jquery.slim.min.map
└── templates
│ ├── about.html
│ ├── contact.html
│ ├── footer.html
│ ├── header.html
│ ├── index.html
│ ├── make-post.html
│ └── post.html
├── day68
├── README.md
├── main.py
├── static
│ ├── css
│ │ └── styles.css
│ └── files
│ │ └── cheat_sheet.pdf
└── templates
│ ├── base.html
│ ├── index.html
│ ├── login.html
│ ├── register.html
│ └── secrets.html
├── day69
├── README.md
├── forms.py
├── main.py
├── static
│ ├── css
│ │ ├── clean-blog.css
│ │ └── clean-blog.min.css
│ ├── img
│ │ ├── about-bg.jpg
│ │ ├── contact-bg.jpg
│ │ └── edit-bg.jpg
│ ├── js
│ │ ├── clean-blog.js
│ │ ├── clean-blog.min.js
│ │ ├── contact_me.js
│ │ └── jqBootstrapValidation.js
│ ├── scss
│ │ ├── _bootstrap-overrides.scss
│ │ ├── _contact.scss
│ │ ├── _footer.scss
│ │ ├── _global.scss
│ │ ├── _masthead.scss
│ │ ├── _mixins.scss
│ │ ├── _navbar.scss
│ │ ├── _post.scss
│ │ ├── _variables.scss
│ │ └── clean-blog.scss
│ └── vendor
│ │ ├── bootstrap
│ │ ├── css
│ │ │ ├── bootstrap-grid.css
│ │ │ ├── bootstrap-grid.css.map
│ │ │ ├── bootstrap-grid.min.css
│ │ │ ├── bootstrap-grid.min.css.map
│ │ │ ├── bootstrap-reboot.css
│ │ │ ├── bootstrap-reboot.css.map
│ │ │ ├── bootstrap-reboot.min.css
│ │ │ ├── bootstrap-reboot.min.css.map
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ └── bootstrap.min.css.map
│ │ └── js
│ │ │ ├── bootstrap.bundle.js
│ │ │ ├── bootstrap.bundle.js.map
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.js.map
│ │ │ ├── bootstrap.min.js
│ │ │ └── bootstrap.min.js.map
│ │ ├── fontawesome-free
│ │ ├── css
│ │ │ ├── all.css
│ │ │ ├── all.min.css
│ │ │ ├── brands.css
│ │ │ ├── brands.min.css
│ │ │ ├── fontawesome.css
│ │ │ ├── fontawesome.min.css
│ │ │ ├── regular.css
│ │ │ ├── regular.min.css
│ │ │ ├── solid.css
│ │ │ ├── solid.min.css
│ │ │ ├── svg-with-js.css
│ │ │ ├── svg-with-js.min.css
│ │ │ ├── v4-shims.css
│ │ │ └── v4-shims.min.css
│ │ └── webfonts
│ │ │ ├── fa-brands-400.eot
│ │ │ ├── fa-brands-400.svg
│ │ │ ├── fa-brands-400.woff
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.svg
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-regular-400.woff
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-solid-900.eot
│ │ │ ├── fa-solid-900.svg
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-solid-900.woff
│ │ │ └── fa-solid-900.woff2
│ │ └── jquery
│ │ ├── jquery.js
│ │ ├── jquery.min.js
│ │ ├── jquery.min.map
│ │ ├── jquery.slim.js
│ │ ├── jquery.slim.min.js
│ │ └── jquery.slim.min.map
└── templates
│ ├── about.html
│ ├── contact.html
│ ├── footer.html
│ ├── header.html
│ ├── index.html
│ ├── login.html
│ ├── make-post.html
│ ├── post.html
│ └── register.html
├── day70
└── README.md
├── day71
├── README.md
├── day71.ipynb
└── salaries_by_college_major.csv
├── day72
├── QueryResults.csv
├── README.md
└── day72.ipynb
├── day73
├── README.md
├── assets
│ ├── bricks.jpg
│ ├── lego_sets.png
│ ├── lego_themes.png
│ └── rebrickable_schema.png
├── data
│ ├── colors.csv
│ ├── sets.csv
│ └── themes.csv
└── day73.ipynb
├── day74
├── Bitcoin Search Trend.csv
├── Daily Bitcoin Price.csv
├── README.md
├── TESLA Search Trend vs Price.csv
├── UE Benefits Search vs UE Rate 2004-19.csv
├── UE Benefits Search vs UE Rate 2004-20.csv
└── day74.ipynb
├── day75
├── README.md
├── apps.csv
└── day75.ipynb
├── day76
├── README.md
├── day76.ipynb
└── yummy_macarons.jpg
├── day77
├── README.md
├── cost_revenue_dirty.csv
└── day77.ipynb
├── day78
├── README.md
├── day78.ipynb
└── nobel_prize_data.csv
├── day79
├── README.md
├── annual_deaths_by_clinic.csv
├── day_79.ipynb
└── monthly_deaths.csv
├── day80
├── README.md
├── boston.csv
└── day80.ipynb
├── day81
├── README.md
└── main.py
├── day82
├── README.md
├── main.py
├── static
│ ├── assets
│ │ ├── css
│ │ │ ├── fontawesome-all.min.css
│ │ │ ├── images
│ │ │ │ ├── avatar.png
│ │ │ │ ├── ie
│ │ │ │ │ └── grad0-15.svg
│ │ │ │ └── overlay.png
│ │ │ └── main.css
│ │ ├── js
│ │ │ ├── breakpoints.min.js
│ │ │ ├── browser.min.js
│ │ │ ├── jquery.min.js
│ │ │ ├── jquery.scrollex.min.js
│ │ │ ├── jquery.scrolly.min.js
│ │ │ ├── main.js
│ │ │ └── util.js
│ │ ├── sass
│ │ │ ├── libs
│ │ │ │ ├── _breakpoints.scss
│ │ │ │ ├── _functions.scss
│ │ │ │ ├── _html-grid.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _vars.scss
│ │ │ │ └── _vendor.scss
│ │ │ └── main.scss
│ │ └── webfonts
│ │ │ ├── fa-brands-400.eot
│ │ │ ├── fa-brands-400.svg
│ │ │ ├── fa-brands-400.ttf
│ │ │ ├── fa-brands-400.woff
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.eot
│ │ │ ├── fa-regular-400.svg
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-regular-400.woff
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-solid-900.eot
│ │ │ ├── fa-solid-900.svg
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-solid-900.woff
│ │ │ └── fa-solid-900.woff2
│ └── images
│ │ ├── avatar.jpg
│ │ ├── banner.jpg
│ │ ├── pic02.jpg
│ │ ├── pic03.jpg
│ │ ├── pic04.jpg
│ │ ├── pic05.jpg
│ │ ├── pic06.jpg
│ │ ├── pic07.jpg
│ │ └── pic08.jpg
└── templates
│ └── index.html
├── day83
├── README.md
└── main.py
├── day84
├── README.md
├── arial.ttf
├── main.py
├── nature.jpg
└── watermarked.jpg
├── day85
├── README.md
├── main.py
└── words.py
├── day86
├── README.md
├── ball.py
├── bricks.py
├── main.py
├── paddle.py
└── scoreboard.py
├── day87
├── README.md
├── cafes.db
├── forms.py
├── main.py
├── static
│ └── style.css
└── templates
│ ├── add.html
│ ├── cafes.html
│ ├── index.html
│ ├── search.html
│ └── update.html
├── day88
├── README.md
├── db.sqlite
├── main.py
└── templates
│ └── index.html
├── day89
├── README.md
└── main.py
├── day90
├── README.md
└── main.py
├── day91
├── README.md
├── image.png
└── main.py
├── day92
├── 4k monitor.csv
├── README.md
└── main.py
├── day93
├── README.md
└── t-rex_bot.py
├── day94
├── README.md
├── assets
│ ├── background-black.png
│ ├── pixel_laser_blue.png
│ ├── pixel_laser_green.png
│ ├── pixel_laser_red.png
│ ├── pixel_laser_yellow.png
│ ├── pixel_ship_blue_small.png
│ ├── pixel_ship_green_small.png
│ ├── pixel_ship_red_small.png
│ └── pixel_ship_yellow.png
└── main.py
├── day95
├── README.md
└── main.py
├── day96
├── README.md
├── public
│ ├── cancel.html
│ ├── checkout.html
│ ├── style.css
│ └── success.html
├── requirements.txt
└── server.py
├── day97
├── README.md
└── main.py
├── day98
├── README.md
├── day98.ipynb
└── mission_launches.csv
└── day99
├── Deaths_by_Police_US.csv
├── Median_Household_Income_2015.csv
├── Pct_Over_25_Completed_High_School.csv
├── Pct_People_Below_Poverty_Level.csv
├── README.md
├── Share_of_Race_By_City.csv
└── day99.ipynb
/day01/README.md:
--------------------------------------------------------------------------------
1 | # Day 1 - Working with Variables in Python to Manage Data
2 | ## Concepts Practised
3 | - Printing to the Console in Python
4 | - String Manipulation and Code Intelligence
5 | - Debugging
6 | - The Python Input Function
7 | - Python Variables
8 | - Variable Naming
9 | ## Band Name Generator
10 | 
11 |
12 | https://replit.com/@phillipra/band-name-generator-start
13 |
--------------------------------------------------------------------------------
/day01/main.py:
--------------------------------------------------------------------------------
1 | print("Welcome to The Band Name Generator!")
2 | city = input("What city did you grow up in?\n")
3 | pet = input("What is the name of your first pet?\n")
4 | print("Your band name is " + city + " " + pet)
5 |
--------------------------------------------------------------------------------
/day02/README.md:
--------------------------------------------------------------------------------
1 | # Day 2 - Understanding Data Types and How to Manipulate Strings
2 | ## Concepts Practised
3 | - Python Primitive Data Types
4 | - Type Error, Type Checking and Type Conversion
5 | - Data Types
6 | - Mathematical Operations in Python
7 | - Number Manipulation and F Strings in Python
8 | ## Tip Calculator
9 | 
10 |
11 | https://replit.com/@phillipra/tip-calculator-start
12 |
--------------------------------------------------------------------------------
/day02/main.py:
--------------------------------------------------------------------------------
1 | print("Welcome to the tip calculator!")
2 |
3 | bill = float(input("What is the total bill amount?\n$:"))
4 | tip = int(input("How much tip would you like to give?\nPercent:"))
5 | split = int(input("How many people to split the bill?\nPeople:"))
6 |
7 | total = ("{:.2f}".format((((bill * (tip / 100)) + bill) / split)))
8 |
9 | print(f"Each person should pay: ${total}")
10 |
--------------------------------------------------------------------------------
/day03/README.md:
--------------------------------------------------------------------------------
1 | # Day 3 - Control Flow and Logical Operators
2 | ## Concepts Practised
3 | - Control Flow with if / else and Conditional Operators
4 | - Modulo Operator
5 | - Nested if statements and elif statements
6 | - Multiple If Statements in Succession
7 | - Logical Operators
8 | ## Treasure Island
9 | 
10 |
11 | https://replit.com/@phillipra/treasure-island
12 |
--------------------------------------------------------------------------------
/day04/README.md:
--------------------------------------------------------------------------------
1 | # Day 4 - Randomisation and Python Lists
2 | ## Concepts Practised
3 | - Random Module
4 | - Understanding the Offset and Appending Items to Lists
5 | - Index Errors and Working with Nested Lists
6 | ## Rock Paper Scissors
7 | 
8 |
9 | https://replit.com/@phillipra/rock-paper-scissors-start
10 |
--------------------------------------------------------------------------------
/day05/README.md:
--------------------------------------------------------------------------------
1 | # Day 5 - Python Loops
2 | ## Concepts Practised
3 | - Using the for loop with Python Lists
4 | - For loops and the range() function
5 | ## Password Generator
6 | 
7 |
8 | replit.com/@phillipra/password-generator-start
9 |
--------------------------------------------------------------------------------
/day06/README.md:
--------------------------------------------------------------------------------
1 | # Day 6 - Python Functions & Karel
2 | ## Concepts Practised
3 | - Defining and Calling Python Functions
4 | - Indentation in Python
5 | - While Loops
6 | ## Escaping the Maze
7 | 
8 |
--------------------------------------------------------------------------------
/day06/main.py:
--------------------------------------------------------------------------------
1 | def turn_right():
2 | turn_left()
3 | turn_left()
4 | turn_left()
5 |
6 | while front_is_clear():
7 | move()
8 | turn_left()
9 |
10 | while not at_goal():
11 | if right_is_clear():
12 | turn_right()
13 | move()
14 | elif front_is_clear():
15 | move()
16 | else:
17 | turn_left()
18 |
--------------------------------------------------------------------------------
/day07/README.md:
--------------------------------------------------------------------------------
1 | # Day 7 - Hangman
2 | ## Concepts Practised
3 | - How to break a Complex Problem down into a Flow Chart
4 | - How to Check the User's Answer
5 | - Improving the User Experience
6 | - How to Add ASCII Art and Improve the UI
7 | ## Hangman
8 | 
9 |
--------------------------------------------------------------------------------
/day08/README.md:
--------------------------------------------------------------------------------
1 | # Day 8 - Function Parameters & Caesar Cipher
2 | ## Concepts Practised
3 | - Functions with Inputs
4 | - Positional vs. Keyword Arguments
5 | ## Caesar Cipher
6 | 
7 |
--------------------------------------------------------------------------------
/day08/art.py:
--------------------------------------------------------------------------------
1 | logo = """
2 | ░█████╗░░█████╗░███████╗░██████╗░█████╗░██████╗░ ░█████╗░██╗██████╗░██╗░░██╗███████╗██████╗░
3 | ██╔══██╗██╔══██╗██╔════╝██╔════╝██╔══██╗██╔══██╗ ██╔══██╗██║██╔══██╗██║░░██║██╔════╝██╔══██╗
4 | ██║░░╚═╝███████║█████╗░░╚█████╗░███████║██████╔╝ ██║░░╚═╝██║██████╔╝███████║█████╗░░██████╔╝
5 | ██║░░██╗██╔══██║██╔══╝░░░╚═══██╗██╔══██║██╔══██╗ ██║░░██╗██║██╔═══╝░██╔══██║██╔══╝░░██╔══██╗
6 | ╚█████╔╝██║░░██║███████╗██████╔╝██║░░██║██║░░██║ ╚█████╔╝██║██║░░░░░██║░░██║███████╗██║░░██║
7 | ░╚════╝░╚═╝░░╚═╝╚══════╝╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝ ░╚════╝░╚═╝╚═╝░░░░░╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝
8 | """
9 |
--------------------------------------------------------------------------------
/day09/README.md:
--------------------------------------------------------------------------------
1 | # Day 9 - Dictionaries, Nesting and the Secret Auction
2 | ## Concepts Practised
3 | - The Python Dictionary
4 | - Nesting Lists and Dictionaries
5 | ## The Secret Auction Program
6 | 
7 |
--------------------------------------------------------------------------------
/day09/art.py:
--------------------------------------------------------------------------------
1 | logo = '''
2 | ▀█▀ █░█ █▀▀ █▀█ █▀█ █ █░█ ▄▀█ ▀█▀ █▀▀ █▄▄ █ █▀▄ █▀▄ █ █▄░█ █▀▀ ▄▀█ █░█ █▀▀ ▀█▀ █ █▀█ █▄░█
3 | ░█░ █▀█ ██▄ █▀▀ █▀▄ █ ▀▄▀ █▀█ ░█░ ██▄ █▄█ █ █▄▀ █▄▀ █ █░▀█ █▄█ █▀█ █▄█ █▄▄ ░█░ █ █▄█ █░▀█
4 | '''
5 |
--------------------------------------------------------------------------------
/day09/main.py:
--------------------------------------------------------------------------------
1 | from replit import clear
2 | from art import logo
3 |
4 |
5 | auction_info = []
6 | auction = True
7 |
8 | def add_new_bidder(bidder_name, bidder_amount):
9 | new_bidder = {}
10 | new_bidder["bid"] = bidder_amount
11 | new_bidder["name"] = bidder_name
12 | auction_info.append(new_bidder)
13 |
14 | while auction:
15 | print(logo)
16 | print("Welcome to the private bidding auction")
17 | name = input("What is your name?: ").title()
18 | bid = float(input("How much would you like to bid?: $"))
19 | add_new_bidder(bidder_name = name, bidder_amount = bid)
20 |
21 | others = input("Are there any other bidders for this auction? Type 'yes' or 'no'.\n")
22 | if others == 'no':
23 | auction = False
24 | highest_bidder = 0
25 | count = -1
26 | for e in auction_info:
27 | if e['bid'] > highest_bidder:
28 | highest_bidder = e['bid']
29 | count += 1
30 | winner = auction_info[count]['name']
31 | print(f"The highest bidder is {winner} with a ${highest_bidder}")
32 | print("Thank you for your participation.")
33 | else:
34 | clear()
35 |
--------------------------------------------------------------------------------
/day10/README.md:
--------------------------------------------------------------------------------
1 | # Day 10 - Functions with Outputs
2 | ## Concepts Practised
3 | - Function with Outputs
4 | - Multiple return values
5 | - Docstrings
6 | - Combining Dictionaries and Functions
7 | - Print vs. Return
8 | - While Loops, Flags and Recursion
9 | ## Calculator
10 | 
11 |
--------------------------------------------------------------------------------
/day10/art.py:
--------------------------------------------------------------------------------
1 | logo = """
2 | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
3 | ██ ▄▀▄ █ ▄▄▀█▄ ▄█ ███████ ▄▄▀█ ▄▄▀█▀▄▀█ ██ ██ █ ▄▄▀█▄ ▄█▀▄▄▀█ ▄▄▀
4 | ██ █ █ █ ▀▀ ██ ██ ▄▄ ████ ████ ▀▀ █ █▀█ ██ ██ █ ▀▀ ██ ██ ██ █ ▀▀▄
5 | ██ ███ █▄██▄██▄██▄██▄████ ▀▀▄█▄██▄██▄██▄▄██▄▄▄█▄██▄██▄███▄▄██▄█▄▄
6 | ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
7 | """
8 |
--------------------------------------------------------------------------------
/day100/README.md:
--------------------------------------------------------------------------------
1 | # Day 100 - Predicting Earnings using Multivariable Regression
2 | ## Concepts Practised
3 | - Filter on Multiple Conditions
4 | - Seaborn Data Visualisation: Bubble Charts
5 | - Plotting Linear Regressions with Seaborn
6 | - scikit-learn to Run Regression
7 | ## Predictied Earnings using Multivariable Regression
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/day11/README.md:
--------------------------------------------------------------------------------
1 | # Day 11 - The Blackjack Capstone Project
2 | ## Concepts Practised
3 | - Refactoring and calling procedures
4 | ## Blackjack
5 | 
6 |
--------------------------------------------------------------------------------
/day11/art.py:
--------------------------------------------------------------------------------
1 | logo = """
2 | .------. _ _ _ _ _
3 | |A_ _ |. | | | | | | (_) | |
4 | |( \/ ).-----. | |__ | | __ _ ___| | ___ __ _ ___| | __
5 | | \ /|K /\ | | '_ \| |/ _` |/ __| |/ / |/ _` |/ __| |/ /
6 | | \/ | / \ | | |_) | | (_| | (__| <| | (_| | (__| <
7 | `-----| \ / | |_.__/|_|\__,_|\___|_|\_\ |\__,_|\___|_|\_\\
8 | | \/ K| _/ |
9 | `------' |__/
10 | """
11 |
--------------------------------------------------------------------------------
/day12/README.md:
--------------------------------------------------------------------------------
1 | # Day 12 - Scope & Number Guessing Game
2 | ## Concepts Practised
3 | - How to Modify a Global Variable
4 | - Python Constants and Global Scope
5 | ## The Number Guessing Game
6 | 
7 |
--------------------------------------------------------------------------------
/day12/art.py:
--------------------------------------------------------------------------------
1 | logo = """
2 | █████▀███████████████████████████████████████████████████████████████████████████████████████
3 | █─▄▄▄▄█▄─██─▄█▄─▄▄─█─▄▄▄▄█─▄▄▄▄███─▄─▄─█─█─█▄─▄▄─███▄─▀█▄─▄█▄─██─▄█▄─▀█▀─▄█▄─▄─▀█▄─▄▄─█▄─▄▄▀█
4 | █─██▄─██─██─███─▄█▀█▄▄▄▄─█▄▄▄▄─█████─███─▄─██─▄█▀████─█▄▀─███─██─███─█▄█─███─▄─▀██─▄█▀██─▄─▄█
5 | ▀▄▄▄▄▄▀▀▄▄▄▄▀▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▀▀▀▄▄▄▀▀▄▀▄▀▄▄▄▄▄▀▀▀▄▄▄▀▀▄▄▀▀▄▄▄▄▀▀▄▄▄▀▄▄▄▀▄▄▄▄▀▀▄▄▄▄▄▀▄▄▀▄▄▀
6 | """
7 |
--------------------------------------------------------------------------------
/day13/Exercise 1 - Debugging Odd or Even/README.md:
--------------------------------------------------------------------------------
1 | # Instructions
2 |
3 | - Read this the code in main.py
4 | - Spot the problems 🐞.
5 | - Modify the code to fix the program.
6 |
7 | Fix the code so that it works and passes the tests when you submit.
8 |
--------------------------------------------------------------------------------
/day13/Exercise 1 - Debugging Odd or Even/main.py:
--------------------------------------------------------------------------------
1 | number = int(input("Which number do you want to check?"))
2 |
3 | if number % 2 == 0:
4 | print("This is an even number.")
5 | else:
6 | print("This is an odd number.")
7 |
--------------------------------------------------------------------------------
/day13/Exercise 2 - Debugging Leap Year/README.md:
--------------------------------------------------------------------------------
1 | # Instructions
2 |
3 | - Read this the code in main.py
4 | - Spot the problems 🐞.
5 | - Modify the code to fix the program.
6 | - No shortcuts - don't copy-paste to replace the code entirely with a working solution.
7 |
8 | Fix the code so that it works and when you hit submit it should pass all the tests.
9 |
--------------------------------------------------------------------------------
/day13/Exercise 2 - Debugging Leap Year/main.py:
--------------------------------------------------------------------------------
1 | year = int(input("Which year do you want to check?"))
2 |
3 | if year % 4 == 0:
4 | if year % 100 == 0:
5 | if year % 400 == 0:
6 | print("Leap year.")
7 | else:
8 | print("Not leap year.")
9 | else:
10 | print("Leap year.")
11 | else:
12 | print("Not leap year.")
13 |
--------------------------------------------------------------------------------
/day13/Exercise 3 - Debugging FizzBuzz/README.md:
--------------------------------------------------------------------------------
1 | # Instructions
2 |
3 | - Read this the code in main.py
4 | - Spot the problems 🐞.
5 | - Modify the code to fix the program.
6 | - No shortcuts - don't copy-paste to replace the code entirely with a working solution.
7 | - The code needs to print the solution to the FizzBuzz game.
8 |
9 | Your program should print each number from 1 to 100 in turn.
10 |
11 | When the number is divisible by 3 then instead of printing the number it should print "Fizz".
12 |
13 | When the number is divisible by 5, then instead of printing the number it should print "Buzz".
14 |
15 | And if the number is divisible by both 3 and 5 e.g. 15 then instead of the number it should print "FizzBuzz"
16 |
--------------------------------------------------------------------------------
/day13/Exercise 3 - Debugging FizzBuzz/main.py:
--------------------------------------------------------------------------------
1 | for number in range(1, 101):
2 | if number % 3 == 0 and number % 5 == 0:
3 | print("FizzBuzz")
4 | elif number % 3 == 0:
5 | print("Fizz")
6 | elif number % 5 == 0:
7 | print("Buzz")
8 | else:
9 | print(number)
10 |
--------------------------------------------------------------------------------
/day13/README.md:
--------------------------------------------------------------------------------
1 | # Day 13 - Debugging: How to Find and Fix Errors in your Code
2 | ## Concepts Practised
3 | - Describing the Problem
4 | - Reproducing the Bug
5 | - Playing Computer and Evaluating Each Line
6 | - Squashing bugs with a print() Statement
7 | - Using a Debugger
8 | ## Exercises
9 | - [Exercise 1](https://github.com/phillipai/100-days-of-code-python/tree/main/day13/Exercise%201%20-%20Debugging%20Odd%20or%20Even): Debugging Odd or Even
10 | - [Exercise 2](https://github.com/phillipai/100-days-of-code-python/tree/main/day13/Exercise%202%20-%20Debugging%20Leap%20Year): Debugging Leap Year
11 | - [Exercise 3](https://github.com/phillipai/100-days-of-code-python/tree/main/day13/Exercise%203%20-%20Debugging%20FizzBuzz): Debugging FizzBuzz
12 |
--------------------------------------------------------------------------------
/day14/README.md:
--------------------------------------------------------------------------------
1 | # Day 14 - Higher Lower Game Project
2 | ## Concepts Practised
3 | - Using Dictionary Data
4 | - Using Procedures
5 | - Using Conditional Statements
6 | ## Higher Lower Game
7 | 
8 |
--------------------------------------------------------------------------------
/day14/art.py:
--------------------------------------------------------------------------------
1 | logo = """ __ ___ __
2 | / / / (_)___ _/ /_ ___ _____
3 | / /_/ / / __ `/ __ \/ _ \/ ___/
4 | / __ / / /_/ / / / / __/ /
5 | /_/ ///_/\__, /_/ /_/\___/_/
6 | / / /____/_ _____ _____
7 | / / / __ \ | /| / / _ \/ ___/
8 | / /___/ /_/ / |/ |/ / __/ /
9 | /_____/\____/|__/|__/\___/_/
10 | """
11 |
12 | vs = """ _ __
13 | | | / /____
14 | | | / / ___/
15 | | |/ (__ )
16 | |___/____(_)
17 | """
18 |
--------------------------------------------------------------------------------
/day15/Coffee Machine Program Requirements.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day15/Coffee Machine Program Requirements.pdf
--------------------------------------------------------------------------------
/day15/README.md:
--------------------------------------------------------------------------------
1 | # Day 15 - Local Development Environment Setup & the Coffee Machine
2 | ## Concepts Practised
3 | - Installing Python Locally
4 | ## Coffee Machine
5 | 
6 |
--------------------------------------------------------------------------------
/day16/Coffee Machine Classes Documentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day16/Coffee Machine Classes Documentation.pdf
--------------------------------------------------------------------------------
/day16/Coffee Machine Program Requirements.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day16/Coffee Machine Program Requirements.pdf
--------------------------------------------------------------------------------
/day16/README.md:
--------------------------------------------------------------------------------
1 | # Day 16 - Object Oriented Programming (OOP)
2 | ## Concepts Practised
3 | - Classes and Objects
4 | - Constructing Objects and Accessing their Attributes and Methods
5 | - How to Add Python Packages and use PyPi
6 | - Modifying Object Attributes and Calling Methods
7 | ## OOP Coffee Machine
8 | 
9 |
--------------------------------------------------------------------------------
/day16/coffee_maker.py:
--------------------------------------------------------------------------------
1 | class CoffeeMaker:
2 | """Models the machine that makes the coffee"""
3 | def __init__(self):
4 | self.resources = {
5 | "water": 300,
6 | "milk": 200,
7 | "coffee": 100,
8 | }
9 |
10 | def report(self):
11 | """Prints a report of all resources."""
12 | print(f"Water: {self.resources['water']}ml")
13 | print(f"Milk: {self.resources['milk']}ml")
14 | print(f"Coffee: {self.resources['coffee']}g")
15 |
16 | def is_resource_sufficient(self, drink):
17 | """Returns True when order can be made, False if ingredients are insufficient."""
18 | can_make = True
19 | for item in drink.ingredients:
20 | if drink.ingredients[item] > self.resources[item]:
21 | print(f"Sorry there is not enough {item}.")
22 | can_make = False
23 | return can_make
24 |
25 | def make_coffee(self, order):
26 | """Deducts the required ingredients from the resources."""
27 | for item in order.ingredients:
28 | self.resources[item] -= order.ingredients[item]
29 | print(f"Here is your {order.name} ☕️. Enjoy!")
30 |
--------------------------------------------------------------------------------
/day16/main.py:
--------------------------------------------------------------------------------
1 | from menu import Menu, MenuItem
2 | from coffee_maker import CoffeeMaker
3 | from money_machine import MoneyMachine
4 |
5 | # List of drinks
6 | espresso = MenuItem("espresso", 50, 0, 18, 1.5)
7 | latte = MenuItem("latte", 200, 150, 24, 2.5)
8 | cappuccino = MenuItem("cappuccino", 250, 100, 24, 3.0)
9 |
10 | # For ordering drinks and checking if drink is available
11 | menu = Menu()
12 |
13 | # Printing report of all resources, checking if resources are sufficient, making coffee
14 | coffee_maker = CoffeeMaker()
15 |
16 | # Printing report and taking payment
17 | money_machine = MoneyMachine()
18 |
19 | on = True
20 | while on:
21 | choice = input(f"What would you like? Choose between espresso, latte or cappuccino: ")
22 | if choice == 'off':
23 | print("Have a good one!")
24 | on = False
25 | elif choice == 'report':
26 | coffee_maker.report()
27 | money_machine.report()
28 | else:
29 | coffee_choice = menu.find_drink(choice)
30 | if coffee_maker.is_resource_sufficient(espresso) and money_machine.make_payment(espresso.cost):
31 | coffee_maker.make_coffee(coffee_choice)
32 |
--------------------------------------------------------------------------------
/day17/README.md:
--------------------------------------------------------------------------------
1 | # Day 17 - The Quiz Project & The Benefits of OOP
2 | ## Concepts Practised
3 | - How to create a Class in Python
4 | - Working with Attributes, Class Constructors and the __init__() Function
5 | - Adding Methods to a Class
6 | ## Quiz Project
7 | 
8 |
--------------------------------------------------------------------------------
/day17/data.py:
--------------------------------------------------------------------------------
1 | question_data = [
2 | {"text": "A slug's blood is green.", "answer": "True"},
3 | {"text": "The loudest animal is the African Elephant.", "answer": "False"},
4 | {"text": "Approximately one quarter of human bones are in the feet.", "answer": "True"},
5 | {"text": "The total surface area of a human lungs is the size of a football pitch.", "answer": "True"},
6 | {"text": "In West Virginia, USA, if you accidentally hit an animal with your car, you are free to take it home "
7 | "to eat.", "answer": "True"},
8 | {"text": "In London, UK, if you happen to die in the House of Parliament, you are entitled to a state funeral."
9 | , "answer": "False"},
10 | {"text": "It is illegal to pee in the Ocean in Portugal.", "answer": "True"},
11 | {"text": "You can lead a cow down stairs but not up stairs.", "answer": "False"},
12 | {"text": "Google was originally called 'Backrub'.", "answer": "True"},
13 | {"text": "Buzz Aldrin's mother's maiden name was 'Moon'.", "answer": "True"},
14 | {"text": "No piece of square dry paper can be folded in half more than 7 times.", "answer": "False"},
15 | {"text": "A few ounces of chocolate can to kill a small dog.", "answer": "True"}
16 | ]
17 |
--------------------------------------------------------------------------------
/day17/main.py:
--------------------------------------------------------------------------------
1 | from question_model import Question
2 | from data import question_data
3 | from quiz_brain import QuizBrain
4 |
5 | question_bank = []
6 | for question in question_data:
7 | question_text = question['text']
8 | question_answer = question['answer']
9 | new_question = Question(question_text, question_answer)
10 | question_bank.append(new_question)
11 |
12 | quiz = QuizBrain(question_bank)
13 |
14 | while quiz.still_has_questions():
15 | quiz.next_question()
16 |
17 | print(f"Thanks for completing that!\nYour final score is: {quiz.score}/{quiz.question_number}")
18 |
--------------------------------------------------------------------------------
/day17/question_model.py:
--------------------------------------------------------------------------------
1 | class Question:
2 |
3 | def __init__(self, text, answer):
4 | self.text = text
5 | self.answer = answer
6 |
--------------------------------------------------------------------------------
/day17/quiz_brain.py:
--------------------------------------------------------------------------------
1 | class QuizBrain:
2 |
3 | def __init__(self, question_list):
4 | self.question_number = 0
5 | self.question_list = question_list
6 | self.score = 0
7 |
8 | def still_has_questions(self):
9 | return self.question_number < len(self.question_list)
10 |
11 | def next_question(self):
12 | current_question = self.question_list[self.question_number]
13 | self.question_number += 1
14 | user_answer = input(f"Q.{self.question_number}: {current_question.text} (True/False)")
15 | self.check_answer(user_answer, current_question.answer)
16 |
17 | def check_answer(self, user_answer, correct_answer):
18 | if user_answer.lower() == correct_answer.lower():
19 | print("You got it right!")
20 | self.score += 1
21 | else:
22 | print("That's incorrect")
23 | print(f"The correct answer was: {correct_answer}.")
24 | print(f"Your current score is {self.score}/{self.question_number}.")
25 | print("\n")
26 |
27 |
--------------------------------------------------------------------------------
/day18/README.md:
--------------------------------------------------------------------------------
1 | # Day 18 - Turtle & the Graphical User Interface (GUI)
2 | ## Concepts Practised
3 | - Understanding Turtle Graphics and How to use the Documentation
4 | - Importing Modules, Installing Packages, and Working with Aliases
5 | - Python Tuples and How to Generate Random RGB Colours
6 | ## The Hirst Painting Project
7 | 
8 |
--------------------------------------------------------------------------------
/day19/README.md:
--------------------------------------------------------------------------------
1 | # Day 19 - Instances, State and Higher Order Functions
2 | ## Concepts Practised
3 | - Python Higher Order Functions & Event Listeners
4 | - Object State and Instances
5 | - The Turtle Coordinate System
6 | ## Turtle Race
7 | 
8 |
--------------------------------------------------------------------------------
/day20/README.md:
--------------------------------------------------------------------------------
1 | # Day 20 - Build the Snake Game Part 1: Animation & Coordinates
2 | ## Concepts Practised
3 | - Screen Setup and Creating a Snake Body
4 | - Animating the Snake Segments on Screen
5 | - Create a Snake Class & Move to OOP
6 | - How to Control the Snake with a Keypress
7 | ## Snake Game Part 1
8 | 
9 |
--------------------------------------------------------------------------------
/day20/main.py:
--------------------------------------------------------------------------------
1 | from turtle import Screen, Turtle
2 | from snake import Snake
3 | import time
4 |
5 | screen = Screen()
6 | screen.setup(width=600, height=600)
7 | screen.bgcolor("black")
8 | screen.title("Snake Game")
9 | screen.tracer(0)
10 |
11 | snake = Snake()
12 |
13 | screen.listen()
14 | screen.onkey(snake.up, "Up")
15 | screen.onkey(snake.down, "Down")
16 | screen.onkey(snake.left, "Left")
17 | screen.onkey(snake.right, "Right")
18 |
19 |
20 | game_is_on = True
21 | while game_is_on:
22 | screen.update()
23 | time.sleep(0.1)
24 |
25 | snake.move()
26 |
27 |
28 |
29 | screen.exitonclick()
30 |
--------------------------------------------------------------------------------
/day21/README.md:
--------------------------------------------------------------------------------
1 | # Day 21 - Build the Snake Game Part 2: Inheritance & List Slicing
2 | ## Concepts Practised
3 | - Class Inheritance
4 | - How to Slice Lists & Tuples in Python
5 | ## Snake Game Part 2
6 | 
7 |
--------------------------------------------------------------------------------
/day21/food.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | import random
3 |
4 |
5 | class Food(Turtle):
6 |
7 | def __init__(self):
8 | super().__init__()
9 | self.shape("circle")
10 | self.penup()
11 | self.shapesize(stretch_len=0.5, stretch_wid=0.5)
12 | self.color("red")
13 | self.speed("fastest")
14 | self.refresh()
15 |
16 | def refresh(self):
17 | random_x = random.randint(-280, 280)
18 | random_y = random.randint(-280, 280)
19 | self.goto(random_x, random_y)
20 |
--------------------------------------------------------------------------------
/day21/scoreboard.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | ALIGNMENT = 'center'
3 | FONT = ('Times New Roman', 24, 'bold')
4 |
5 |
6 | class Scoreboard(Turtle):
7 |
8 | def __init__(self):
9 | super().__init__()
10 | self.score = 0
11 | self.hideturtle()
12 | self.penup()
13 | self.color("white")
14 | self.goto(0, 260)
15 |
16 | def start_scoreboard(self):
17 | self.write(arg=f"Score: {self.score}", align=ALIGNMENT, font=FONT)
18 |
19 | def increase_scoreboard(self):
20 | self.clear()
21 | self.score += 1
22 | self.start_scoreboard()
23 |
24 | def game_over(self):
25 | self.goto(0, 0)
26 | self.write(arg="GAME OVER", align=ALIGNMENT, font=FONT)
27 |
--------------------------------------------------------------------------------
/day22/README.md:
--------------------------------------------------------------------------------
1 | # Day 22 - Build Pong: The Famous Arcade Game
2 | ## Concepts Practised
3 | - Create a Paddle that responds to Key Presses
4 | - Write the Paddle Class and Create the Second Paddle
5 | - Write the Ball Class and Make the Ball Move
6 | - Add the Ball Bouncing Logic
7 | - How to Detect Collisions with the Paddle
8 | - How to Detect when the Ball goes Out of Bounds
9 | - Score Keeping and Changing the Ball Speed
10 | ## Pong
11 | 
12 |
--------------------------------------------------------------------------------
/day22/ball.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 |
3 |
4 | class Ball(Turtle):
5 |
6 | def __init__(self):
7 | super().__init__()
8 | self.shape("square")
9 | self.color("white")
10 | self.penup()
11 | self.x_move = 10
12 | self.y_move = 10
13 | self.move_speed = 0.1
14 |
15 | def move(self):
16 | new_x = self.xcor() + self.x_move
17 | new_y = self.ycor() + self.y_move
18 | self.goto(new_x, new_y)
19 |
20 | def bounce_y(self):
21 | self.y_move *= -1
22 | self.move_speed *= 0.9
23 |
24 | def bounce_x(self):
25 | self.x_move *= -1
26 | self.move_speed *= 0.9
27 |
28 | def reset_position(self):
29 | self.home()
30 | self.move_speed = 0.1
31 | self.bounce_x()
32 |
--------------------------------------------------------------------------------
/day22/main.py:
--------------------------------------------------------------------------------
1 | from turtle import Screen
2 | from paddle import Paddle
3 | from ball import Ball
4 | from scoreboard import Scoreboard
5 | import time
6 |
7 | screen = Screen()
8 | screen.bgcolor("black")
9 | screen.setup(width=800, height=600)
10 | screen.title("Pong")
11 | screen.tracer(0)
12 |
13 | r_paddle = Paddle((350, 0))
14 | l_paddle = Paddle((-350, 0))
15 | ball = Ball()
16 | scoreboard = Scoreboard()
17 |
18 | screen.listen()
19 | screen.onkeypress(r_paddle.go_up, "Up")
20 | screen.onkeypress(r_paddle.go_down, "Down")
21 | screen.onkeypress(l_paddle.go_up, "w")
22 | screen.onkeypress(l_paddle.go_down, "s")
23 |
24 | game_is_on = True
25 | while game_is_on:
26 | time.sleep(ball.move_speed)
27 | screen.update()
28 | ball.move()
29 |
30 | if ball.ycor() > 280 or ball.ycor() < -280:
31 | ball.bounce_y()
32 |
33 | if ball.distance(r_paddle) < 50 and ball.xcor() > 320 or ball.distance(l_paddle) < 50 and ball.xcor() < -320:
34 | ball.bounce_x()
35 |
36 | if ball.xcor() > 380:
37 | ball.reset_position()
38 | scoreboard.l_point()
39 |
40 | if ball.xcor() < -380:
41 | ball.reset_position()
42 | scoreboard.r_point()
43 |
44 | screen.exitonclick()
45 |
--------------------------------------------------------------------------------
/day22/paddle.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 |
3 |
4 | class Paddle(Turtle):
5 |
6 | def __init__(self, position):
7 | super().__init__()
8 | self.shape("square")
9 | self.color("white")
10 | self.shapesize(stretch_wid=5, stretch_len=1)
11 | self.penup()
12 | self.goto(position)
13 |
14 | def go_up(self):
15 | new_y = self.ycor() + 20
16 | self.goto(self.xcor(), new_y)
17 |
18 | def go_down(self):
19 | new_y = self.ycor() - 20
20 | self.goto(self.xcor(), new_y)
21 |
--------------------------------------------------------------------------------
/day22/scoreboard.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 |
3 |
4 | class Scoreboard(Turtle):
5 |
6 | def __init__(self):
7 | super().__init__()
8 | self.color("white")
9 | self.penup()
10 | self.hideturtle()
11 | self.l_score = 0
12 | self.r_score = 0
13 | self.update_scoreboard()
14 |
15 | def update_scoreboard(self):
16 | self.clear()
17 | self.goto(-100, 190)
18 | self.write(self.l_score, align="center", font=("Times New Roman", 80, "normal"))
19 | self.goto(100, 190)
20 | self.write(self.r_score, align="center", font=("Times New Roman", 80, "normal"))
21 |
22 | def l_point(self):
23 | self.l_score += 1
24 | self.update_scoreboard()
25 |
26 | def r_point(self):
27 | self.r_score += 1
28 | self.update_scoreboard()
29 |
--------------------------------------------------------------------------------
/day23/README.md:
--------------------------------------------------------------------------------
1 | # Day 23 - The Turtle Crossing Capstone Project
2 | ## Concepts Practised
3 | - Create a Turtle that responds to Key Presses
4 | - Write the Car Class and Create to Randomly Spawn Cars
5 | - How to Detect Collisions with the Cars
6 | - How to Detect when the Turtle Crosses Sucessfully
7 | - Score Keeping and Changing the Car Speed
8 | ## Turtle Crossing
9 | 
10 |
--------------------------------------------------------------------------------
/day23/car_manager.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | import random
3 |
4 |
5 | COLORS = ["red", "orange", "yellow", "green", "blue", "purple"]
6 | STARTING_MOVE_DISTANCE = 5
7 | MOVE_INCREMENT = 10
8 |
9 |
10 | class CarManager:
11 |
12 | def __init__(self):
13 | self.cars = []
14 | self.starting_speed = STARTING_MOVE_DISTANCE
15 | self.increment = MOVE_INCREMENT
16 |
17 | def add_car(self):
18 | car_chance = random.randint(1, 6)
19 | if car_chance == 6:
20 | new_car = Turtle("square")
21 | new_car.penup()
22 | new_car.color(random.choice(COLORS))
23 | new_car.shapesize(stretch_len=2, stretch_wid=1)
24 | random_y = random.randint(-250, 250)
25 | new_car.goto(300, random_y)
26 | self.cars.append(new_car)
27 |
28 | def increase_speed(self):
29 | self.starting_speed += self.increment
30 |
31 | def move_car(self):
32 | for car in self.cars:
33 | car.backward(self.starting_speed)
34 |
--------------------------------------------------------------------------------
/day23/main.py:
--------------------------------------------------------------------------------
1 | import time
2 | from turtle import Screen
3 | from player import Player
4 | from car_manager import CarManager
5 | from scoreboard import Scoreboard
6 |
7 | screen = Screen()
8 | screen.setup(width=600, height=600)
9 | screen.title("Turtle Crossing")
10 | screen.tracer(0)
11 |
12 | player = Player()
13 | scoreboard = Scoreboard()
14 | car_manager = CarManager()
15 |
16 | screen.listen()
17 | screen.onkeypress(player.move_up, "Up")
18 |
19 | game_is_on = True
20 | while game_is_on:
21 | time.sleep(0.1)
22 | screen.update()
23 |
24 | car_manager.add_car()
25 | car_manager.move_car()
26 |
27 | if player.ycor() > 310:
28 | scoreboard.player_point()
29 | player.starting_position()
30 | car_manager.increase_speed()
31 |
32 | for car in car_manager.cars:
33 | if player.distance(car) < 20:
34 | game_is_on = False
35 | scoreboard.game_over()
36 |
37 |
38 | screen.exitonclick()
39 |
--------------------------------------------------------------------------------
/day23/player.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | STARTING_POSITION = (0, -280)
3 | MOVE_DISTANCE = 10
4 | FINISH_LINE_Y = 280
5 |
6 |
7 | class Player(Turtle):
8 |
9 | def __init__(self):
10 | super().__init__()
11 | self.setheading(90)
12 | self.shape("turtle")
13 | self.color("black")
14 | self.penup()
15 | self.goto(STARTING_POSITION)
16 |
17 | def move_up(self):
18 | new_y = self.ycor() + MOVE_DISTANCE
19 | self.goto(self.xcor(), new_y)
20 |
21 | def starting_position(self):
22 | self.goto(STARTING_POSITION)
23 |
--------------------------------------------------------------------------------
/day23/scoreboard.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | ALIGNMENT = 'center'
3 | FONT = ("Courier", 24, "normal")
4 |
5 |
6 | class Scoreboard(Turtle):
7 |
8 | def __init__(self):
9 | super().__init__()
10 | self.goto(-290, 260)
11 | self.color("black")
12 | self.penup()
13 | self.hideturtle()
14 | self.player_score = 0
15 | self.update_scoreboard()
16 |
17 | def update_scoreboard(self):
18 | self.clear()
19 | self.write(f"Level:{self.player_score}", font=FONT)
20 |
21 | def player_point(self):
22 | self.player_score += 1
23 | self.update_scoreboard()
24 |
25 | def game_over(self):
26 | self.goto(0, 0)
27 | self.write(arg="GAME OVER", align=ALIGNMENT, font=FONT)
28 |
--------------------------------------------------------------------------------
/day24/README.md:
--------------------------------------------------------------------------------
1 | # Day 24 - Files, Directories and Paths
2 | ## Concepts Practised
3 | - How to Open, Read, and Write to Files using the "with" Keyword
4 | - Relative and Absolute File Paths
5 | - Add a High Score to the Snake Game
6 | ## Snake Game with a High Score
7 | 
8 | ## Mail Merge
9 | 
10 |
--------------------------------------------------------------------------------
/day24/mail_merge/Input/Letters/starting_letter.txt:
--------------------------------------------------------------------------------
1 | Dear [name],
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Input/Names/invited_names.txt:
--------------------------------------------------------------------------------
1 | Aang
2 | Zuko
3 | Appa
4 | Katara
5 | Sokka
6 | Momo
7 | Uncle Iroh
8 | Toph
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/example.txt:
--------------------------------------------------------------------------------
1 | Dear Aang,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Aang.txt:
--------------------------------------------------------------------------------
1 | Dear Aang,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Appa.txt:
--------------------------------------------------------------------------------
1 | Dear Appa,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Katara.txt:
--------------------------------------------------------------------------------
1 | Dear Katara,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Momo.txt:
--------------------------------------------------------------------------------
1 | Dear Momo,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Sokka.txt:
--------------------------------------------------------------------------------
1 | Dear Sokka,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Toph.txt:
--------------------------------------------------------------------------------
1 | Dear Toph,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Uncle Iroh.txt:
--------------------------------------------------------------------------------
1 | Dear Uncle Iroh,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/Output/ReadyToSend/letter_for_Zuko.txt:
--------------------------------------------------------------------------------
1 | Dear Zuko,
2 |
3 | You are invited to my birthday this Saturday.
4 |
5 | Hope you can make it!
6 |
7 | Angela
8 |
--------------------------------------------------------------------------------
/day24/mail_merge/main.py:
--------------------------------------------------------------------------------
1 | with open("./Input/Names/invited_names.txt") as invited_names:
2 | names_list = (invited_names.readlines())
3 |
4 | with open("./Input/Letters/starting_letter.txt") as file:
5 | contents = file.read()
6 |
7 | for name in names_list:
8 | name = name.strip()
9 | new = contents.replace("[name]", name)
10 | with open(f"./Output/ReadyToSend/letter_for_{name}.txt",
11 | mode="w") as final_file:
12 | final_file.write(new)
13 |
--------------------------------------------------------------------------------
/day24/snake_game/data.txt:
--------------------------------------------------------------------------------
1 | 0
2 |
--------------------------------------------------------------------------------
/day24/snake_game/food.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | import random
3 |
4 |
5 | class Food(Turtle):
6 |
7 | def __init__(self):
8 | super().__init__()
9 | self.shape("circle")
10 | self.penup()
11 | self.shapesize(stretch_len=0.5, stretch_wid=0.5)
12 | self.color("blue")
13 | self.speed("fastest")
14 | self.refresh()
15 |
16 | def refresh(self):
17 | random_x = random.randint(-280, 280)
18 | random_y = random.randint(-280, 280)
19 | self.goto(random_x, random_y)
20 |
--------------------------------------------------------------------------------
/day24/snake_game/scoreboard.py:
--------------------------------------------------------------------------------
1 | from turtle import Turtle
2 | ALIGNMENT = "center"
3 | FONT = ("Courier", 24, "normal")
4 |
5 |
6 | class Scoreboard(Turtle):
7 |
8 | def __init__(self):
9 | super().__init__()
10 | self.score = 0
11 | self.high_score = 0
12 | self.color("white")
13 | self.penup()
14 | self.goto(0, 260)
15 | self.hideturtle()
16 | self.update_scoreboard()
17 |
18 | def update_scoreboard(self):
19 | self.clear()
20 | self.read_file()
21 | self.write(f"Score: {self.score} High Score: {self.high_score}", align=ALIGNMENT, font=FONT)
22 |
23 | def reset(self):
24 | if self.score > self.high_score:
25 | self.high_score = self.score
26 | self.write_file()
27 | self.score = 0
28 | self.update_scoreboard()
29 |
30 | def increase_score(self):
31 | self.score += 1
32 | self.update_scoreboard()
33 |
34 | def read_file(self):
35 | with open("data.txt") as file:
36 | self.high_score = int(file.read())
37 |
38 | def write_file(self):
39 | with open("data.txt", mode="w") as file:
40 | file.write(f"{self.high_score}")
41 |
--------------------------------------------------------------------------------
/day25/50_states.csv:
--------------------------------------------------------------------------------
1 | state,x,y
2 | Alabama,139,-77
3 | Alaska,-204,-170
4 | Arizona,-203,-40
5 | Arkansas,57,-53
6 | California,-297,13
7 | Colorado,-112,20
8 | Connecticut,297,96
9 | Delaware,275,42
10 | Florida,220,-145
11 | Georgia,182,-75
12 | Hawaii,-317,-143
13 | Idaho,-216,122
14 | Illinois,95,37
15 | Indiana,133,39
16 | Iowa,38,65
17 | Kansas,-17,5
18 | Kentucky,149,1
19 | Louisiana,59,-114
20 | Maine,319,164
21 | Maryland,288,27
22 | Massachusetts,312,112
23 | Michigan,148,101
24 | Minnesota,23,135
25 | Mississippi,94,-78
26 | Missouri,49,6
27 | Montana,-141,150
28 | Nebraska,-61,66
29 | Nevada,-257,56
30 | New Hampshire,302,127
31 | New Jersey,282,65
32 | New Mexico,-128,-43
33 | New York,236,104
34 | North Carolina,239,-22
35 | North Dakota,-44,158
36 | Ohio,176,52
37 | Oklahoma,-8,-41
38 | Oregon,-278,138
39 | Pennsylvania,238,72
40 | Rhode Island,318,94
41 | South Carolina,218,-51
42 | South Dakota,-44,109
43 | Tennessee,131,-34
44 | Texas,-38,-106
45 | Utah,-189,34
46 | Vermont,282,154
47 | Virginia,234,12
48 | Washington,-257,193
49 | West Virginia,200,20
50 | Wisconsin,83,113
51 | Wyoming,-134,90
--------------------------------------------------------------------------------
/day25/README.md:
--------------------------------------------------------------------------------
1 | # Day 25 - Working with CSV Data and the Pandas Library
2 | ## Concepts Practised
3 | - Reading CSV Data in Python
4 | - DataFrames & Series
5 | - Working with Rows & Columns
6 | - Data Analysis with Pandas
7 | ## U.S. States Game
8 | 
9 |
--------------------------------------------------------------------------------
/day25/blank_states_img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day25/blank_states_img.gif
--------------------------------------------------------------------------------
/day25/states_to_learn.csv:
--------------------------------------------------------------------------------
1 | ,0
2 | 0,Alabama
3 | 1,Arkansas
4 | 2,Connecticut
5 | 3,Delaware
6 | 4,Idaho
7 | 5,Indiana
8 | 6,Iowa
9 | 7,Kansas
10 | 8,Maine
11 | 9,Massachusetts
12 | 10,Michigan
13 | 11,Missouri
14 | 12,Nebraska
15 | 13,New Hampshire
16 | 14,New Jersey
17 | 15,Oklahoma
18 | 16,Oregon
19 | 17,Vermont
20 | 18,Virginia
21 | 19,West Virginia
22 | 20,Wyoming
23 |
--------------------------------------------------------------------------------
/day26/README.md:
--------------------------------------------------------------------------------
1 | # Day 26 - List Comprehension and the Nato Alphabet
2 | ## Concepts Practised
3 | - How to Create Lists using List Comprehension
4 | - How to use Dictionary Comprehension
5 | - How to Iterate over a Pandas DataFrame
6 | ## Nato Alphabet Project
7 | 
8 |
--------------------------------------------------------------------------------
/day26/main.py:
--------------------------------------------------------------------------------
1 | import pandas
2 |
3 | nato_data = pandas.read_csv("nato_phonetic_alphabet.csv")
4 |
5 | nato_dict = {row.letter: row.code for (index, row) in nato_data.iterrows()}
6 | input_word = input("Enter a word: ").upper()
7 | answer = [nato_dict[letter] for letter in input_word]
8 | print(answer)
9 |
--------------------------------------------------------------------------------
/day26/nato_phonetic_alphabet.csv:
--------------------------------------------------------------------------------
1 | letter,code
2 | A,Alfa
3 | B,Bravo
4 | C,Charlie
5 | D,Delta
6 | E,Echo
7 | F,Foxtrot
8 | G,Golf
9 | H,Hotel
10 | I,India
11 | J,Juliet
12 | K,Kilo
13 | L,Lima
14 | M,Mike
15 | N,November
16 | O,Oscar
17 | P,Papa
18 | Q,Quebec
19 | R,Romeo
20 | S,Sierra
21 | T,Tango
22 | U,Uniform
23 | V,Victor
24 | W,Whiskey
25 | X,X-ray
26 | Y,Yankee
27 | Z,Zulu
--------------------------------------------------------------------------------
/day27/README.md:
--------------------------------------------------------------------------------
1 | # Day 27 - Tkinter, *args, **kwargs and Creating GUI Programs
2 | ## Concepts Practised
3 | - Creating Windows and Labels with Tkinter
4 | - Setting Default Values for Optional Arguments inside a Function Header
5 | - *args
6 | - **kwargs
7 | - Buttons, Entry, and Setting Component Options
8 | - Other Tkinter Widgets: Radiobuttons, Scales, Checkbuttons and more
9 | - Tkinter Layout Managers: pack(), place() and grid()
10 | ## Miles to KM Converter
11 | 
12 |
--------------------------------------------------------------------------------
/day27/main.py:
--------------------------------------------------------------------------------
1 | from tkinter import *
2 |
3 |
4 | def miles_to_km():
5 | calc_num = float(num_miles.get()) * 1.609
6 | answer_label.config(text=round(calc_num, 2))
7 |
8 |
9 | window = Tk()
10 | window.title("Miles to KM")
11 | window.config(padx=20, pady=20)
12 |
13 | miles_label = Label(text="Miles", font="Arial")
14 | miles_label.grid(column=2, row=0)
15 | miles_label.config(padx=10, pady=10)
16 |
17 | km_label = Label(text="KM", font="Arial")
18 | km_label.grid(column=2, row=1)
19 | km_label.config(padx=10, pady=10)
20 |
21 | equal_label = Label(text="Equals", font="Arial")
22 | equal_label.grid(column=0, row=1)
23 | equal_label.config(padx=10, pady=10)
24 |
25 | answer_label = Label(text="0", font="Arial")
26 | answer_label.grid(column=1, row=1)
27 | answer_label.config(padx=10, pady=10)
28 |
29 | num_miles = Entry(width=10)
30 | num_miles.grid(column=1, row=0)
31 |
32 | calculate_button = Button(text="Calculate", command=miles_to_km)
33 | calculate_button.grid(column=1, row=2)
34 |
35 |
36 | window.mainloop()
37 |
--------------------------------------------------------------------------------
/day28/README.md:
--------------------------------------------------------------------------------
1 | # Day 28 - Tkinter, Dynamic Typing and the Pomodoro GUI Application
2 | ## Concepts Practised
3 | - How to work with the Canvas Widget and Add Images to Tkinter
4 | - Add a Count Down Mechanism
5 | - Dynamic Typing
6 | - Setting Different Timer Sessions and Values
7 | - Adding Checkmarks and Resetting the Application
8 | ## Pomodoro Timer
9 | 
10 |
--------------------------------------------------------------------------------
/day28/tomato.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day28/tomato.png
--------------------------------------------------------------------------------
/day29/README.md:
--------------------------------------------------------------------------------
1 | # Day 29 - Building a Password Manager GUI App with Tkinter
2 | ## Concepts Practised
3 | - Working with Images and Setting up the Canvas
4 | - Use grid() and columnspan to Complete the User Interface
5 | - Saving Data to File
6 | - Dialog Boxes and Pop-Ups in Tkinter
7 | - Generate a Password & Copy it to the Clipboard
8 | ## Password Manager
9 | 
10 |
--------------------------------------------------------------------------------
/day29/data.txt:
--------------------------------------------------------------------------------
1 | Amazon | phillip@email.com | wJ(28#RlN)mLfOz
2 |
--------------------------------------------------------------------------------
/day29/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day29/logo.png
--------------------------------------------------------------------------------
/day30/README.md:
--------------------------------------------------------------------------------
1 | # Day 30 - Errors, Exceptions and JSON Data: Improving the Password Manager
2 | ## Concepts Practised
3 | - Catching Exceptions: The try catch except finally Pattern
4 | - Raising Exceptions
5 | - IndexError Handling
6 | - KeyError Handling
7 | - Write, read and update JSON data in the Password Manager
8 | ## Password Manager 2.0
9 | 
10 |
--------------------------------------------------------------------------------
/day30/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "Amazon": {
3 | "email": "phillip@email.com",
4 | "password": "Uo4N+S%KW$k$Cb4y"
5 | }
6 | }
--------------------------------------------------------------------------------
/day30/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day30/logo.png
--------------------------------------------------------------------------------
/day31/README.md:
--------------------------------------------------------------------------------
1 | # Day 31 - Flash Card App Capstone Project
2 | ## Concepts Practised
3 | - Create the User Interface (UI) with Tkinter
4 | - Create New Flash Cards
5 | - Flip the Cards
6 | - Save Study Progress
7 | ## Flash Card App
8 | 
9 |
--------------------------------------------------------------------------------
/day31/images/card_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day31/images/card_back.png
--------------------------------------------------------------------------------
/day31/images/card_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day31/images/card_front.png
--------------------------------------------------------------------------------
/day31/images/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day31/images/right.png
--------------------------------------------------------------------------------
/day31/images/wrong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day31/images/wrong.png
--------------------------------------------------------------------------------
/day32/README.md:
--------------------------------------------------------------------------------
1 | # Day 32 - Send Email (smtplib) & Manage Dates (datetime)
2 | ## Concepts Practised
3 | - How to Send Emails with Python using SMTP
4 | - Working with the datetime Module
5 | ## Automated Birthday Wisher
6 | 
7 |
--------------------------------------------------------------------------------
/day32/birthdays.csv:
--------------------------------------------------------------------------------
1 | name,email,year,month,day
2 | Tim,phillipaipython@gmail.com,1999,2,27
--------------------------------------------------------------------------------
/day32/letter_templates/letter_1.txt:
--------------------------------------------------------------------------------
1 | Dear Tim,
2 |
3 | Happy birthday!
4 |
5 | All the best for the year!
6 |
7 | Phillip
--------------------------------------------------------------------------------
/day32/letter_templates/letter_2.txt:
--------------------------------------------------------------------------------
1 | Hey Tim,
2 |
3 | Happy birthday! Have a wonderful time today and eat lots of cake!
4 |
5 | Lots of love,
6 |
7 | Phillip
--------------------------------------------------------------------------------
/day32/letter_templates/letter_3.txt:
--------------------------------------------------------------------------------
1 | Dear Tim,
2 |
3 | It's your birthday! Have a great day!
4 |
5 | All my love,
6 |
7 | Phillip
--------------------------------------------------------------------------------
/day32/main.py:
--------------------------------------------------------------------------------
1 | import datetime as dt
2 | import pandas
3 | import random
4 | import smtplib
5 |
6 | MY_EMAIL = "phillipaipython@outlook.com"
7 | MY_PASSWORD = "password"
8 |
9 | random_num = random.randint(1, 3)
10 | random_letter = f"letter_{random_num}.txt"
11 |
12 | now = dt.datetime.now()
13 | month_day = (now.month, now.day)
14 |
15 | data = pandas.read_csv("birthdays.csv")
16 | birthdays_dict = {(data_row["month"], data_row["day"]): data_row for (index, data_row) in data.iterrows()}
17 | birthday_person = birthdays_dict[month_day]
18 |
19 | if month_day in birthdays_dict:
20 | with open(f"./letter_templates/{random_letter}", "r") as file:
21 | letter_data = file.read()
22 |
23 | letter_data = letter_data.replace("[NAME]", birthday_person["name"])
24 |
25 | with open(f"./letter_templates/{random_letter}", "w") as file:
26 | file.write(letter_data)
27 |
28 | with smtplib.SMTP("smtp.outlook.com") as connection:
29 | connection.starttls()
30 | connection.login(MY_EMAIL, MY_PASSWORD)
31 | connection.sendmail(
32 | from_addr=MY_EMAIL,
33 | to_addrs=birthday_person["email"],
34 | msg=f"Subject: Happy Birthday!\n\n{letter_data}"
35 | )
36 |
--------------------------------------------------------------------------------
/day33/README.md:
--------------------------------------------------------------------------------
1 | # Day 33 - API Endpoints & API Parameters - ISS Overhead Notifier
2 | ## Concepts Practised
3 | - API Endpoints and Making API Calls
4 | - Working with Responses: HTTP Codes, Exceptions & JSON Data
5 | - API Parameters: Match Sunset Times with the Current Time
6 | ## ISS Overhead Notifier
7 | 
8 |
--------------------------------------------------------------------------------
/day34/README.md:
--------------------------------------------------------------------------------
1 | # Day 34 - API Practice - Creating a GUI Quiz App
2 | ## Concepts Practised
3 | - Unescaping HTML Entities
4 | - Class based Tkinter UI
5 | - Python Typing: Type Hints and Arrows ->
6 | ## GUI Quiz App
7 | 
8 |
--------------------------------------------------------------------------------
/day34/data.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 |
4 | parameters = {
5 | "amount": 10,
6 | "type": "boolean",
7 | "category": 18,
8 | }
9 | response = requests.get(url="https://opentdb.com/api.php", params=parameters)
10 | response.raise_for_status()
11 | data = response.json()
12 | question_data = data["results"]
13 |
--------------------------------------------------------------------------------
/day34/images/false.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day34/images/false.png
--------------------------------------------------------------------------------
/day34/images/true.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day34/images/true.png
--------------------------------------------------------------------------------
/day34/main.py:
--------------------------------------------------------------------------------
1 | from question_model import Question
2 | from data import question_data
3 | from quiz_brain import QuizBrain
4 | from ui import QuizInterface
5 |
6 | question_bank = []
7 | for question in question_data:
8 | question_text = question["question"]
9 | question_answer = question["correct_answer"]
10 | new_question = Question(question_text, question_answer)
11 | question_bank.append(new_question)
12 |
13 | quiz = QuizBrain(question_bank)
14 | quiz_ui = QuizInterface(quiz)
15 |
16 | print("You've completed the quiz")
17 | print(f"Your final score was: {quiz.score}/{quiz.question_number}")
18 |
--------------------------------------------------------------------------------
/day34/question_model.py:
--------------------------------------------------------------------------------
1 | class Question:
2 |
3 | def __init__(self, q_text, q_answer):
4 | self.text = q_text
5 | self.answer = q_answer
6 |
--------------------------------------------------------------------------------
/day34/quiz_brain.py:
--------------------------------------------------------------------------------
1 | import html
2 |
3 |
4 | class QuizBrain:
5 |
6 | def __init__(self, q_list):
7 | self.question_number = 0
8 | self.score = 0
9 | self.question_list = q_list
10 | self.current_question = None
11 |
12 | def still_has_questions(self):
13 | return self.question_number < len(self.question_list)
14 |
15 | def next_question(self):
16 | self.current_question = self.question_list[self.question_number]
17 | self.question_number += 1
18 | q_text = html.unescape(self.current_question.text)
19 | return f"Q.{self.question_number}: {q_text}"
20 |
21 | def check_answer(self, user_answer):
22 | correct_answer = self.current_question.answer
23 | if user_answer.lower() == correct_answer.lower():
24 | self.score += 1
25 | return True
26 | else:
27 | return False
28 |
29 |
--------------------------------------------------------------------------------
/day35/README.md:
--------------------------------------------------------------------------------
1 | # Day 35 - Keys, Authentication & Environment Variables - Telegram Rain Notifier
2 | ## Concepts Practised
3 | - Using API Keys to Authenticate and Get the Weather from OpenWeatherMap
4 | - Sending Alerts via the Telegram
5 | - Using PythonAnywhere to Automate the Python Script
6 | - Understanding Environment Variables and Hiding API Keys
7 | ## Rain Notifier
8 | 
9 |
--------------------------------------------------------------------------------
/day35/main.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import os
3 |
4 |
5 | def telegram_bot_send_text(bot_message):
6 | bot_token = os.environ.get("BOT_TOKEN")
7 | bot_chatID = os.environ.get("BOT_CHATID")
8 | send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID \
9 | + '&parse_mode=Markdown&text=' + bot_message
10 |
11 | bot_response = requests.get(send_text)
12 | return bot_response.json()
13 |
14 |
15 | api_key = os.environ.get("API_KEY")
16 |
17 | parameters = {
18 | "lat": 43.653225,
19 | "lon": -79.383186,
20 | "exclude": "current,minutely,daily",
21 | "appid": api_key,
22 | }
23 |
24 | response = requests.get(url="https://api.openweathermap.org/data/2.5/onecall", params=parameters)
25 | response.raise_for_status()
26 | weather_data = response.json()
27 |
28 | will_rain = False
29 |
30 | for hour in range(12):
31 | weather_id = (weather_data['hourly'][hour]['weather'][0]['id'])
32 | if weather_id < 700:
33 | will_rain = True
34 |
35 | if will_rain:
36 | message = "🌧 It's going to rain today, bring an umbrella with you."
37 | telegram_bot_send_text(message)
38 |
--------------------------------------------------------------------------------
/day36/README.md:
--------------------------------------------------------------------------------
1 | # Day 36 - Stock Trading News Alert Project
2 | ## Concepts Practised
3 | - Using API to Check for Stock Price Movements
4 | - Using API to Get the News Articles
5 | - Using API to Send Telegram Alerts/Messages
6 | ## Stock Trading News Alert
7 | 
8 |
--------------------------------------------------------------------------------
/day37/README.md:
--------------------------------------------------------------------------------
1 | # Day 37 - Habit Tracking Project: API Post Requests & Headers
2 | ## Concepts Practised
3 | - HTTP Post Requests
4 | - Advanced Authentication using an HTTP Header
5 | - Autofilling dates using strftime function
6 | - How to use HTTP Put and Delete Requests
7 | ## Habit Tracking
8 |
9 |
--------------------------------------------------------------------------------
/day38/README.md:
--------------------------------------------------------------------------------
1 | # Day 38 - Workout Tracking Using Google Sheets
2 | ## Concepts Practised
3 | - Get Exercise Stats with Natural Language Queries
4 | - Saving Data into Google Sheets (POST request)
5 | - Authenticate Sheety API (Basic Authentication)
6 | - Environment Variables
7 | ## Workout Tracking
8 | 
9 |
--------------------------------------------------------------------------------
/day39/README.md:
--------------------------------------------------------------------------------
1 | # Day 39 - Capstone Part 1: Flight Deal Finder
2 | ## Concepts Practised
3 | - OOP
4 | - HTTP Requests
5 | - Using API to Send Telegram Alerts
6 | - Autofilling dates using strftime function
7 | ## Flight Deal Finder
8 | 
9 |
--------------------------------------------------------------------------------
/day39/data_manager.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 | SHEETY_PRICES_ENDPOINT = "https://api.sheety.co/*************************/flightDeals/prices/"
4 |
5 |
6 | class DataManager:
7 |
8 | def __init__(self):
9 | self.destination_data = {}
10 |
11 | def get_destination_data(self):
12 | response = requests.get(url=SHEETY_PRICES_ENDPOINT)
13 | data = response.json()
14 | self.destination_data = data["prices"]
15 | return self.destination_data
16 |
17 | def update_destination_codes(self):
18 | for city in self.destination_data:
19 | new_data = {
20 | "price": {
21 | "iataCode": city["iataCode"]
22 | }
23 | }
24 | response = requests.put(
25 | url=f"{SHEETY_PRICES_ENDPOINT}/{city['id']}",
26 | json=new_data
27 | )
28 | print(response.text)
29 |
--------------------------------------------------------------------------------
/day39/flight_data.py:
--------------------------------------------------------------------------------
1 | class FlightData:
2 |
3 | def __init__(self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date):
4 | self.price = price
5 | self.origin_city = origin_city
6 | self.origin_airport = origin_airport
7 | self.destination_city = destination_city
8 | self.destination_airport = destination_airport
9 | self.out_date = out_date
10 | self.return_date = return_date
11 |
--------------------------------------------------------------------------------
/day39/notification_manager.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 | BOT_TOKEN = "********************************************"
4 | BOT_CHATID = "*********"
5 |
6 |
7 | class NotificationManager:
8 |
9 | def telegram_bot_send_text(self, bot_message):
10 | bot_token = BOT_TOKEN
11 | bot_chatID = BOT_CHATID
12 | send_text = 'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID \
13 | + '&parse_mode=Markdown&text=' + bot_message
14 | bot_response = requests.get(send_text)
15 | return bot_response.json()
16 |
17 |
--------------------------------------------------------------------------------
/day40/README.md:
--------------------------------------------------------------------------------
1 | # Day 40 - Capstone Part 2: Flight Club
2 | ## Concepts Practised
3 | - OOP
4 | - HTTP Requests
5 | - Send Emails with Python using SMTP
6 | - Autofilling dates using strftime function
7 | ## Flight Club
8 | 
9 |
--------------------------------------------------------------------------------
/day40/flight_data.py:
--------------------------------------------------------------------------------
1 | class FlightData:
2 |
3 | def __init__(
4 | self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date, stop_overs=0, via_city=""):
5 | self.price = price
6 | self.origin_city = origin_city
7 | self.origin_airport = origin_airport
8 | self.destination_city = destination_city
9 | self.destination_airport = destination_airport
10 | self.out_date = out_date
11 | self.return_date = return_date
12 | self.stop_overs = stop_overs
13 | self.via_city = via_city
14 |
--------------------------------------------------------------------------------
/day41/README.md:
--------------------------------------------------------------------------------
1 | # Day 41 - Introduction to HTML
2 | ## Concepts Practised
3 | - The Anatomy of an HTML Tag
4 | - HTML Boilerplate
5 | - How to Structure Text in HTML
6 | - HTML Lists
7 | - HTML Image Elements
8 | - HTML Links and Anchor Tags
9 | ## Basic HTML Website
10 | 
11 |
--------------------------------------------------------------------------------
/day41/contact.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Contact Me
6 |
7 |
8 | Not my Contact Details
9 | Not my address:
10 | 111 Rainbow Road
11 | Not my e-mail: notmyemail@email.com
12 |
13 |
14 |
--------------------------------------------------------------------------------
/day41/hobbies.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | My Hobbies
6 |
7 |
8 | My Hobbies
9 |
10 | Reading
11 | Working out
12 | Cars
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/day41/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Phillip's Personal Site
7 |
8 |
9 |
10 |
11 | Phillip
12 | Aspiring Software Developer
13 | I love to code in Python .
14 |
15 | Education
16 |
22 | My Hobbies
23 |
24 | Contact Me
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/day41/profile pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day41/profile pic.png
--------------------------------------------------------------------------------
/day42/README.md:
--------------------------------------------------------------------------------
1 | # Day 42 - Intermediate HTML
2 | ## Concepts Practised
3 | - HTML Tables
4 | - Using HTML Tables for Layout
5 | - HTML Forms
6 | - Create a Contact Me Form
7 | ## Basic HTML Website
8 | 
9 |
--------------------------------------------------------------------------------
/day42/contact.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Contact Me
6 |
7 |
8 | Not my Contact Details
9 | Not my address:
10 | 111 Rainbow Road
11 | Not my e-mail: notmyemail@email.com
12 |
13 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/day42/hobbies.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | My Hobbies
6 |
7 |
8 | My Hobbies
9 |
10 | Reading
11 | Working out
12 | Cars
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/day43/README.md:
--------------------------------------------------------------------------------
1 | # Day 43 - Introduction to CSS
2 | ## Concepts Practised
3 | - Inline CSS
4 | - Internal CSS
5 | - External CSS
6 | - How to Debug CSS Code
7 | - The Anatomy of CSS Syntax
8 | - CSS Selectors
9 | - Classes vs. Ids
10 | ## HTML Website Using CSS
11 | 
12 |
--------------------------------------------------------------------------------
/day43/contact.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Contact Me
6 |
7 |
8 |
9 | Not my Contact Details
10 | Not my address:
11 | 111 Rainbow Road
12 | Not my e-mail: notmyemail@email.com
13 |
14 |
15 | Your Name:
16 |
17 | Your eMail:
18 |
19 | Your Message:
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/day43/css/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #EAF6F6;
3 | }
4 |
5 | hr {
6 | border-style: dotted none none;
7 | border-color: grey;
8 | border-width: 5px;
9 | width: 5%;
10 | }
11 |
12 | h1 {
13 | color: #66BFBF;
14 | }
15 |
16 | h3 {
17 | color: #66BFBF;
18 | }
19 |
--------------------------------------------------------------------------------
/day43/hobbies.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | My Hobbies
6 |
7 |
8 |
9 | My Hobbies
10 |
11 | Reading
12 | Working out
13 | Cars
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/day43/profile pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day43/profile pic.png
--------------------------------------------------------------------------------
/day44/README.md:
--------------------------------------------------------------------------------
1 | # Day 44 - Intermediate CSS
2 | ## Concepts Practised
3 | - HTML Divs
4 | - CSS Static and Relative Positioning
5 | - Absolute Positioning
6 | - Centering Elements with CSS
7 | - Font Styling
8 | - CSS Sizing
9 | - CSS Float and Clear
10 | ## HTML Website Using CSS
11 | 
12 |
--------------------------------------------------------------------------------
/day44/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day44/favicon.ico
--------------------------------------------------------------------------------
/day44/images/chillies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day44/images/chillies.png
--------------------------------------------------------------------------------
/day44/images/cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day44/images/cloud.png
--------------------------------------------------------------------------------
/day44/images/mountain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day44/images/mountain.png
--------------------------------------------------------------------------------
/day44/images/profile pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day44/images/profile pic.png
--------------------------------------------------------------------------------
/day45/README.md:
--------------------------------------------------------------------------------
1 | # Day 45 - Web Scraping with Beautiful Soup
2 | ## Concepts Practised
3 | - Parsing HTML and Making Soup
4 | - Finding and Selecting Particular Elements with BeautifulSoup
5 | - Scraping a Live Website
6 | ## Web Scraping - 100 Movies That You Must Watch
7 | 
8 |
--------------------------------------------------------------------------------
/day45/main.py:
--------------------------------------------------------------------------------
1 | import requests
2 | from bs4 import BeautifulSoup
3 |
4 | URL = "https://web.archive.org/web/20200518073855/https://www.empireonline.com/movies/features/best-movies-2/"
5 |
6 | response = requests.get(URL)
7 | website_html = response.text
8 |
9 | soup = BeautifulSoup(website_html, "html.parser")
10 |
11 | all_movies = soup.find_all(name="h3", class_="title")
12 | movie_titles = [movie.getText() for movie in all_movies]
13 | movies = movie_titles[::-1]
14 |
15 | with open("movies.txt", mode="w") as file:
16 | for movie in movies:
17 | print(movie)
18 | file.write(f"{movie}\n")
19 |
--------------------------------------------------------------------------------
/day46/README.md:
--------------------------------------------------------------------------------
1 | # Day 46 - Create a Spotify Playlist Using The Musical Time Machine
2 | ## Concepts Practised
3 | - Finding and Selecting Particular Elements with BeautifulSoup
4 | - Using API Keys
5 | - Spotify Authrorization with the Spotipy module
6 | - Using a Redirect URI
7 | ## Music Time Machine
8 | 
9 |
--------------------------------------------------------------------------------
/day47/README.md:
--------------------------------------------------------------------------------
1 | # Day 47 - Create an Automated Amazon Price Tracker
2 | ## Concepts Practised
3 | - Finding and Selecting Particular Elements with BeautifulSoup
4 | - Scraping a Live Website
5 | ## Amazon Price Tracker
6 | 
7 |
--------------------------------------------------------------------------------
/day48/README.md:
--------------------------------------------------------------------------------
1 | # Day 48 - Selenium Webdriver Browser and Game Playing Bot
2 | ## Concepts Practised
3 | - Finding and Selecting Elements on a Website with Selenium
4 | - Use Selenium to Scrape Website Data
5 | - Automate Filling Out Forms and Clicking Buttons with Selenium
6 | ## Cookie Clicker Bot
7 | 
8 |
--------------------------------------------------------------------------------
/day49/README.md:
--------------------------------------------------------------------------------
1 | # Day 49 - Automating Job Applications on LinkedIn
2 | ## Concepts Practised
3 | - Finding and Selecting Elements on a Website with Selenium
4 | - Use Selenium to Scrape Website Data
5 | - Automate Filling Out Forms and Clicking Buttons with Selenium
6 | ## Linkedin Job Application Bot
7 | 
8 |
--------------------------------------------------------------------------------
/day50/README.md:
--------------------------------------------------------------------------------
1 | # Day 50 - Auto Tinder Swiping Bot
2 | ## Concepts Practised
3 | - Finding and Selecting Elements on a Website with Selenium
4 | - Use Selenium to Scrape Website Data
5 | - Automate Filling Out Forms and Clicking Buttons with Selenium
6 | - Applying NoSuchElementException and ElementClickInterceptedException
7 | - Switching Selenium Between Windows
8 | ## Tinder Swiping Bot
9 | 
10 |
--------------------------------------------------------------------------------
/day51/README.md:
--------------------------------------------------------------------------------
1 | # Day 51 - Internet Speed Twitter Complaint Bot
2 | ## Concepts Practised
3 | - Finding and Selecting Elements on a Website with Selenium
4 | - Use Selenium to Scrape Website Data
5 | - Automate Filling Out Forms and Clicking Buttons with Selenium
6 | - OOP
7 | ## Internet Speed Twitter Complaint Bot
8 | 
9 |
--------------------------------------------------------------------------------
/day52/README.md:
--------------------------------------------------------------------------------
1 | # Day 52 - Instagram Follower Bot
2 | ## Concepts Practised
3 | - Finding and Selecting Elements on a Website with Selenium
4 | - Use Selenium to Scrape Website Data
5 | - Automate Filling Out Forms and Clicking Buttons with Selenium
6 | - OOP
7 |
--------------------------------------------------------------------------------
/day53/README.md:
--------------------------------------------------------------------------------
1 | # Day 53 - Web Scraping Capstone - Data Entry Job Automation
2 | ## Concepts Practised
3 | - Finding and Selecting Particular Elements with BeautifulSoup
4 | - Finding and Selecting Elements on a Website with Selenium
5 | - Use BeautifulSoup to Scrape Website Data
6 | - Use Selenium to Scrape Website Data
7 | - Scraping a Live Website
8 | - Automate Filling Out Forms and Clicking Buttons with Selenium
9 | ## Data Entry Bot
10 | 
11 |
--------------------------------------------------------------------------------
/day54/README.md:
--------------------------------------------------------------------------------
1 | # Day 54 - Introduction to Web Development with Flask
2 | ## Concepts Practised
3 | - Create a Web Server with Flask
4 | - Use the Command Line on Windows and Mac
5 | - `__name__` and `__main__` : Special Attributes built into Python
6 | - Python Functions as First Class Objects: Passing & Nesting Functions
7 | - Python Decorator Functions and the `@` Syntax
8 | Create a Python Decorator
9 | ## Python Decorator
10 | 
11 |
--------------------------------------------------------------------------------
/day54/hello.py:
--------------------------------------------------------------------------------
1 | from flask import Flask
2 | app = Flask(__name__)
3 |
4 |
5 | @app.route('/')
6 | def hello_world():
7 | return 'Hello, World!'
8 |
--------------------------------------------------------------------------------
/day54/main.py:
--------------------------------------------------------------------------------
1 | import time
2 | current_time = time.time()
3 | print(current_time)
4 |
5 |
6 | def speed_calc_decorator(function):
7 | def wrapper_function():
8 | start_time = time.time()
9 | function()
10 | end_time = time.time()
11 | print(f"{function.__name__} run time = {end_time - start_time} second(s)")
12 | return wrapper_function
13 |
14 |
15 | @speed_calc_decorator
16 | def fast_function():
17 | for i in range(10000000):
18 | i * i
19 |
20 |
21 | @speed_calc_decorator
22 | def slow_function():
23 | for i in range(100000000):
24 | i * i
25 |
26 |
27 | fast_function()
28 | slow_function()
29 |
--------------------------------------------------------------------------------
/day55/README.md:
--------------------------------------------------------------------------------
1 | # Day 55 - HTML & URL Parsing in Flask and the Higher Lower Game
2 | ## Concepts Practised
3 | - Flask URL Paths and the Flask Debugger
4 | - Rendering HTML Elements with Flask
5 | - Use Python Decorators to Style HTML Tags
6 | - Decorators with `*args` and `**kwargs`
7 | ## Higher Lower Game
8 | 
9 |
--------------------------------------------------------------------------------
/day55/main.py:
--------------------------------------------------------------------------------
1 | from flask import Flask
2 | import random
3 |
4 |
5 | app = Flask(__name__)
6 | random_number = random.randint(0, 9)
7 | print(random_number)
8 |
9 |
10 | @app.route('/')
11 | def home_page():
12 | return 'Guess a number between 0 and 9 ' \
13 | ' '
14 |
15 |
16 | @app.route("/")
17 | def user_guess(guess):
18 | if guess < random_number:
19 | return 'Too low, try again. ' \
20 | ' '
21 | elif guess == random_number:
22 | return 'Correct, you won! ' \
23 | ' '
24 | else:
25 | return 'Too high, try again. ' \
26 | ' '
27 |
28 |
29 | if __name__ == "__main__":
30 | app.run(debug=True)
31 |
--------------------------------------------------------------------------------
/day56/README.md:
--------------------------------------------------------------------------------
1 | # Day 56 - Rendering HTML/Static Files and Using Website Templates
2 | ## Concepts Practised
3 | - Rendering HTML Files with Flask
4 | - Serving Static Files using Flask
5 | - Use Website Templates to Speed Up Web Development
6 | ## Name Card Website
7 |
8 |
--------------------------------------------------------------------------------
/day56/server.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template
2 |
3 |
4 | app = Flask(__name__)
5 |
6 |
7 | @app.route('/')
8 | def home_page():
9 | return render_template("index.html")
10 |
11 |
12 | if __name__ == "__main__":
13 | app.run(port=8080, debug=True)
14 |
--------------------------------------------------------------------------------
/day56/static/assets/css/ie8.css:
--------------------------------------------------------------------------------
1 | /*
2 | Identity by HTML5 UP
3 | html5up.net | @n33co
4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5 | */
6 |
7 | /* List */
8 |
9 | ul.icons li a {
10 | -ms-behavior: url("assets/js/PIE.htc");
11 | }
12 |
13 | ul.icons li a:before {
14 | text-align: center;
15 | font-size: 26px;
16 | }
17 |
18 | /* Main */
19 |
20 | #main {
21 | -ms-behavior: url("assets/js/PIE.htc");
22 | }
23 |
24 | #main .avatar img {
25 | -ms-behavior: url("assets/js/PIE.htc");
26 | }
27 |
28 | /* Footer */
29 |
30 | #footer {
31 | color: #fff;
32 | }
33 |
34 | #footer .copyright li {
35 | border-left: solid 1px #fff;
36 | }
--------------------------------------------------------------------------------
/day56/static/assets/css/ie9.css:
--------------------------------------------------------------------------------
1 | /*
2 | Identity by HTML5 UP
3 | html5up.net | @n33co
4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5 | */
6 |
7 | /* Basic */
8 |
9 | body {
10 | background-image: url("../../images/bg.jpg");
11 | background-repeat: no-repeat;
12 | background-size: cover;
13 | background-position: bottom center;
14 | background-attachment: fixed;
15 | }
16 |
17 | body:after {
18 | display: none;
19 | }
20 |
21 | /* List */
22 |
23 | ul.icons li a:before {
24 | color: #c8cccf;
25 | }
26 |
27 | ul.icons li a:hover:before {
28 | color: #ff7496;
29 | }
30 |
31 | /* Wrapper */
32 |
33 | #wrapper {
34 | text-align: center;
35 | }
36 |
37 | /* Main */
38 |
39 | #main {
40 | display: inline-block;
41 | }
--------------------------------------------------------------------------------
/day56/static/assets/css/images/overlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/css/images/overlay.png
--------------------------------------------------------------------------------
/day56/static/assets/css/noscript.css:
--------------------------------------------------------------------------------
1 | /*
2 | Identity by HTML5 UP
3 | html5up.net | @n33co
4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5 | */
6 |
7 | /* Basic */
8 |
9 | body:after {
10 | display: none;
11 | }
12 |
13 | /* Main */
14 |
15 | #main {
16 | -moz-transform: none !important;
17 | -webkit-transform: none !important;
18 | -ms-transform: none !important;
19 | transform: none !important;
20 | opacity: 1 !important;
21 | }
--------------------------------------------------------------------------------
/day56/static/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/day56/static/assets/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/day56/static/assets/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/day56/static/assets/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/day56/static/assets/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/assets/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/day56/static/assets/sass/components/_icon.scss:
--------------------------------------------------------------------------------
1 | @import '../libs/vars';
2 | @import '../libs/functions';
3 | @import '../libs/mixins';
4 |
5 | ///
6 | /// Identity by HTML5 UP
7 | /// html5up.net | @n33co
8 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
9 | ///
10 |
11 | /* Icon */
12 |
13 | .icon {
14 | @include icon;
15 | position: relative;
16 | border-bottom: none;
17 |
18 | > .label {
19 | display: none;
20 | }
21 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/ie8.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /*
7 | Identity by HTML5 UP
8 | html5up.net | @n33co
9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
10 | */
11 |
12 | /* List */
13 |
14 | ul {
15 | &.icons {
16 | li {
17 | a {
18 | -ms-behavior: url('assets/js/PIE.htc');
19 |
20 | &:before {
21 | text-align: center;
22 | font-size: 26px;
23 | }
24 | }
25 | }
26 | }
27 | }
28 |
29 | /* Main */
30 |
31 | #main {
32 | -ms-behavior: url('assets/js/PIE.htc');
33 |
34 | .avatar {
35 | img {
36 | -ms-behavior: url('assets/js/PIE.htc');
37 | }
38 | }
39 | }
40 |
41 | /* Footer */
42 |
43 | #footer {
44 | color: #fff;
45 |
46 | .copyright {
47 | li {
48 | border-left: solid 1px #fff;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/ie9.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /*
7 | Identity by HTML5 UP
8 | html5up.net | @n33co
9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
10 | */
11 |
12 | /* Basic */
13 |
14 | body {
15 | background-image: url('../../images/bg.jpg');
16 | background-repeat: no-repeat;
17 | background-size: cover;
18 | background-position: bottom center;
19 | background-attachment: fixed;
20 |
21 | &:after {
22 | display: none;
23 | }
24 | }
25 |
26 | /* List */
27 |
28 | ul {
29 | &.icons {
30 | li {
31 | a {
32 | &:before {
33 | color: _palette(border);
34 | }
35 |
36 | &:hover {
37 | &:before {
38 | color: _palette(highlight);
39 | }
40 | }
41 | }
42 | }
43 | }
44 | }
45 |
46 | /* Wrapper */
47 |
48 | #wrapper {
49 | text-align: center;
50 | }
51 |
52 | /* Main */
53 |
54 | #main {
55 | display: inline-block;
56 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/layout/_footer.scss:
--------------------------------------------------------------------------------
1 | @import '../libs/vars';
2 | @import '../libs/functions';
3 | @import '../libs/mixins';
4 |
5 | ///
6 | /// Identity by HTML5 UP
7 | /// html5up.net | @n33co
8 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
9 | ///
10 |
11 | /* Footer */
12 |
13 | #footer {
14 | @include vendor('align-self', 'flex-end');
15 | width: 100%;
16 | padding: _size(element-margin) 0 0 0;
17 | color: rgba(255,255,255,0.75);
18 | cursor: default;
19 | text-align: center;
20 |
21 | .copyright {
22 | margin: 0;
23 | padding: 0;
24 | font-size: 0.9em;
25 | list-style: none;
26 |
27 | li {
28 | display: inline-block;
29 | margin: 0 0 0 (0.85em - (_size(letter-spacing) * 2));
30 | padding: 0 0 0 0.85em;
31 | border-left: solid _size(border-width) rgba(255,255,255,0.5);
32 | line-height: 1;
33 |
34 | &:first-child {
35 | border-left: 0;
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/layout/_wrapper.scss:
--------------------------------------------------------------------------------
1 | @import '../libs/vars';
2 | @import '../libs/functions';
3 | @import '../libs/mixins';
4 |
5 | ///
6 | /// Identity by HTML5 UP
7 | /// html5up.net | @n33co
8 | /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
9 | ///
10 |
11 | /* Wrapper */
12 |
13 | #wrapper {
14 | @include vendor('display', 'flex');
15 | @include vendor('align-items', 'center');
16 | @include vendor('justify-content', 'space-between');
17 | @include vendor('flex-direction', 'column');
18 | @include vendor('perspective', '1000px');
19 | position: relative;
20 | min-height: 100%;
21 | padding: _size(element-margin);
22 | z-index: 2;
23 |
24 | > * {
25 | z-index: 1;
26 | }
27 |
28 | &:before {
29 | content: '';
30 | display: block;
31 | }
32 |
33 | @include breakpoint(xxsmall) {
34 | padding: (_size(element-margin) * 0.5);
35 | }
36 |
37 | body.is-ie & {
38 | height: 100%;
39 | }
40 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/libs/_functions.scss:
--------------------------------------------------------------------------------
1 | /// Gets a duration value.
2 | /// @param {string} $keys Key(s).
3 | /// @return {string} Value.
4 | @function _duration($keys...) {
5 | @return val($duration, $keys...);
6 | }
7 |
8 | /// Gets a font value.
9 | /// @param {string} $keys Key(s).
10 | /// @return {string} Value.
11 | @function _font($keys...) {
12 | @return val($font, $keys...);
13 | }
14 |
15 | /// Gets a misc value.
16 | /// @param {string} $keys Key(s).
17 | /// @return {string} Value.
18 | @function _misc($keys...) {
19 | @return val($misc, $keys...);
20 | }
21 |
22 | /// Gets a palette value.
23 | /// @param {string} $keys Key(s).
24 | /// @return {string} Value.
25 | @function _palette($keys...) {
26 | @return val($palette, $keys...);
27 | }
28 |
29 | /// Gets a size value.
30 | /// @param {string} $keys Key(s).
31 | /// @return {string} Value.
32 | @function _size($keys...) {
33 | @return val($size, $keys...);
34 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/libs/_mixins.scss:
--------------------------------------------------------------------------------
1 | /// Makes an element's :before pseudoelement a FontAwesome icon.
2 | /// @param {string} $content Optional content value to use.
3 | @mixin icon($content: false) {
4 |
5 | text-decoration: none;
6 |
7 | &:before {
8 |
9 | @if $content {
10 | content: $content;
11 | }
12 |
13 | -moz-osx-font-smoothing: grayscale;
14 | -webkit-font-smoothing: antialiased;
15 | font-family: FontAwesome;
16 | font-style: normal;
17 | font-weight: normal;
18 | text-transform: none !important;
19 |
20 | }
21 |
22 | }
23 |
24 | /// Applies padding to an element, taking the current element-margin value into account.
25 | /// @param {mixed} $tb Top/bottom padding.
26 | /// @param {mixed} $lr Left/right padding.
27 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
28 | /// @param {bool} $important If true, adds !important.
29 | @mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {
30 |
31 | @if $important {
32 | $important: '!important';
33 | }
34 |
35 | padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max(0.1em, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};
36 |
37 | }
--------------------------------------------------------------------------------
/day56/static/assets/sass/libs/_vars.scss:
--------------------------------------------------------------------------------
1 | // Misc.
2 | $misc: (
3 | z-index-base: 10000
4 | );
5 |
6 | // Duration.
7 | $duration: (
8 | transition: 0.2s,
9 | bg: 1.75s,
10 | main: 1s
11 | );
12 |
13 | // Size.
14 | $size: (
15 | border-radius: 4px,
16 | border-width: 1px,
17 | element-height: 2.75em,
18 | element-margin: 1.5em,
19 | letter-spacing: 0.2em
20 | );
21 |
22 | // Font.
23 | $font: (
24 | family: ('Source Sans Pro', Helvetica, sans-serif),
25 | family-fixed: ('Courier New', monospace),
26 | weight: 300
27 | );
28 |
29 | // Palette.
30 | $palette: (
31 | bg: #ffffff,
32 | bg-alt: #e1dfe8,
33 | fg: #414f57,
34 | fg-bold: #313f47,
35 | fg-light: #616f77,
36 | border: #c8cccf,
37 | accent1: #ffa596,
38 | accent2: #00e4ff,
39 | highlight: #ff7496
40 | );
--------------------------------------------------------------------------------
/day56/static/assets/sass/noscript.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /*
7 | Identity by HTML5 UP
8 | html5up.net | @n33co
9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
10 | */
11 |
12 | /* Basic */
13 |
14 | body {
15 | &:after {
16 | display: none;
17 | }
18 | }
19 |
20 | /* Main */
21 |
22 | #main {
23 | @include vendor('transform', 'none !important');
24 | opacity: 1 !important;
25 | }
--------------------------------------------------------------------------------
/day56/static/images/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/images/avatar.png
--------------------------------------------------------------------------------
/day56/static/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day56/static/images/bg.jpg
--------------------------------------------------------------------------------
/day57/README.md:
--------------------------------------------------------------------------------
1 | # Day 57 - Templating with Jinja in Flask Applications
2 | ## Concepts Practised
3 | - Using Jinja to Produce Dynamic HTML Pages
4 | - Combining Jinja Templating with APIs
5 | - Multiline Statements with Jinja
6 | - URL Building with Flask
7 | ## Blog Capstone Project Part 1 - Templating
8 | 
9 |
--------------------------------------------------------------------------------
/day57/main.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template
2 | import requests
3 |
4 |
5 | BLOG_URL = "https://api.npoint.io/c790b4d5cab58020d391"
6 | app = Flask(__name__)
7 |
8 |
9 | @app.route('/')
10 | def home():
11 | return render_template("index.html")
12 |
13 |
14 | @app.route("/blog")
15 | def get_blog():
16 | response = requests.get(BLOG_URL)
17 | all_posts = response.json()
18 | return render_template("index.html", posts=all_posts)
19 |
20 |
21 | @app.route("/post/")
22 | def find_post(post_id):
23 | response = requests.get(BLOG_URL)
24 | all_posts = response.json()
25 | if post_id == 1:
26 | return render_template("post.html", posts=all_posts)
27 | if post_id == 2:
28 | return render_template("post2.html", posts=all_posts)
29 | if post_id == 3:
30 | return render_template("post3.html", posts=all_posts)
31 |
32 |
33 | if __name__ == "__main__":
34 | app.run(debug=True)
35 |
--------------------------------------------------------------------------------
/day57/post.py:
--------------------------------------------------------------------------------
1 | class Post:
2 | pass
--------------------------------------------------------------------------------
/day57/templates/post.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 | {% for blog_post in posts: %}
17 | {% if blog_post["id"] == 1: %}
18 |
{{ blog_post["title"] }}
19 |
{{ blog_post["subtitle"] }}
20 |
{{ blog_post["body"] }}
21 | {% endif %}
22 | {% endfor %}
23 |
24 |
25 |
26 |
27 |
28 | Made with ♥️ in Toronto.
29 |
30 |
--------------------------------------------------------------------------------
/day57/templates/post2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 | {% for blog_post in posts: %}
17 | {% if blog_post["id"] == 2: %}
18 |
{{ blog_post["title"] }}
19 |
{{ blog_post["subtitle"] }}
20 |
{{ blog_post["body"] }}
21 | {% endif %}
22 | {% endfor %}
23 |
24 |
25 |
26 |
27 |
28 | Made with ♥️ in Toronto.
29 |
30 |
--------------------------------------------------------------------------------
/day57/templates/post3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 | {% for blog_post in posts: %}
17 | {% if blog_post["id"] == 3: %}
18 |
{{ blog_post["title"] }}
19 |
{{ blog_post["subtitle"] }}
20 |
{{ blog_post["body"] }}
21 | {% endif %}
22 | {% endfor %}
23 |
24 |
25 |
26 |
27 |
28 | Made with ♥️ in Toronto.
29 |
30 |
--------------------------------------------------------------------------------
/day58/README.md:
--------------------------------------------------------------------------------
1 | # Day 58 - Web Foundation Boostrap
2 | ## Concepts Practised
3 | - Installing Bootstrap
4 | - The Bootstrap Navigation Bar
5 | - The Bootstrap Grid Layout System
6 | - Grid Layouts
7 | - Bootstrap Containers
8 | - Bootstrap Buttons and Font Awesome
9 | - The Bootstrap Carousel
10 | - Bootstrap Cards
11 | - CSS Z-index and Stacking Order
12 | - Media Query Breakpoints
13 | - Code Refactoring
14 | - Combining Selectors
15 | - Selector Priority
16 | ## Bootstrap Website
17 | 
18 |
--------------------------------------------------------------------------------
/day58/images/TechCrunch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/TechCrunch.png
--------------------------------------------------------------------------------
/day58/images/bizinsider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/bizinsider.png
--------------------------------------------------------------------------------
/day58/images/dog-img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/dog-img.jpg
--------------------------------------------------------------------------------
/day58/images/iphone6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/iphone6.png
--------------------------------------------------------------------------------
/day58/images/lady-img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/lady-img.jpg
--------------------------------------------------------------------------------
/day58/images/mashable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/mashable.png
--------------------------------------------------------------------------------
/day58/images/tnw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day58/images/tnw.png
--------------------------------------------------------------------------------
/day59/README.md:
--------------------------------------------------------------------------------
1 | # Day 59 - Blog Capstone Project Part 2 - Adding Styling
2 | ## Concepts Practised
3 | - Using Jinja to Produce Dynamic HTML Pages
4 | - Combining Jinja Templating with APIs
5 | - Multiline Statements with Jinja
6 | - URL Building with Flask
7 | ## Blog Capstone Project Part 2 - Adding Styling
8 | 
9 |
--------------------------------------------------------------------------------
/day59/main.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template
2 | import requests
3 |
4 |
5 | blog_url = "https://api.npoint.io/2b1e1701b179fe512483"
6 | blog_resp = requests.get(blog_url)
7 | all_posts = blog_resp.json()
8 |
9 |
10 | app = Flask(__name__)
11 |
12 |
13 | @app.route('/')
14 | def home():
15 | return render_template("index.html", posts=all_posts)
16 |
17 |
18 | @app.route('/index.html')
19 | def index():
20 | return render_template("index.html", posts=all_posts)
21 |
22 |
23 | @app.route('/about.html')
24 | def about():
25 | return render_template('about.html')
26 |
27 |
28 | @app.route('/contact.html')
29 | def contact():
30 | return render_template('contact.html')
31 |
32 |
33 | @app.route('/post/')
34 | def get_post(p_id):
35 | return render_template('post.html', post=all_posts[int(p_id) - 1])
36 |
37 |
38 | if __name__ == "__main__":
39 | app.run(debug=True)
--------------------------------------------------------------------------------
/day59/static/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/favicon.ico
--------------------------------------------------------------------------------
/day59/static/assets/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/img/about-bg.jpg
--------------------------------------------------------------------------------
/day59/static/assets/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/img/contact-bg.jpg
--------------------------------------------------------------------------------
/day59/static/assets/img/home-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/img/home-bg.jpg
--------------------------------------------------------------------------------
/day59/static/assets/img/post-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/img/post-bg.jpg
--------------------------------------------------------------------------------
/day59/static/assets/img/post-sample-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day59/static/assets/img/post-sample-image.jpg
--------------------------------------------------------------------------------
/day59/templates/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Phillip's Blog
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/day60/README.md:
--------------------------------------------------------------------------------
1 | # Day 60 - Make POST Requests with Flask and HTML Forms
2 | ## Concepts Practised
3 | - Creating an HTML Form from Scratch
4 | - Handle POST Requests with Flask Servers
5 | - Creating a working Contact Form
6 | - Sending Email with smtplib
7 | ## Functional Contact Form
8 | 
9 |
--------------------------------------------------------------------------------
/day60/static/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/favicon.ico
--------------------------------------------------------------------------------
/day60/static/assets/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/img/about-bg.jpg
--------------------------------------------------------------------------------
/day60/static/assets/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/img/contact-bg.jpg
--------------------------------------------------------------------------------
/day60/static/assets/img/home-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/img/home-bg.jpg
--------------------------------------------------------------------------------
/day60/static/assets/img/post-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/img/post-bg.jpg
--------------------------------------------------------------------------------
/day60/static/assets/img/post-sample-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day60/static/assets/img/post-sample-image.jpg
--------------------------------------------------------------------------------
/day60/templates/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Phillip's Blog
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/day61/README.md:
--------------------------------------------------------------------------------
1 | # Day 61 - Building Advanced Forms with Flask-WTForms
2 | ## Concepts Practised
3 | - Creating Forms with Flask-WTF
4 | - Adding Validation to Forms with Flask-WTF
5 | - Receiving Form Data with WTForms
6 | - Inheriting Templates Using Jinja2
7 | - Using Flask-Bootstrap as an Inherited Template
8 | ## Flask-WTForms
9 | 
10 |
--------------------------------------------------------------------------------
/day61/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool]
2 | [tool.poetry]
3 | authors = ["Your Name "]
4 | name = "root"
5 | version = "0.0.0"
6 | description="flask template"
7 | [tool.poetry.dependencies]
8 | flask = "==1.0.2"
9 | python = "^3.8"
10 |
--------------------------------------------------------------------------------
/day61/requirements.txt:
--------------------------------------------------------------------------------
1 | click==7.1.2
2 | dnspython==2.0.0
3 | dominate==2.5.2
4 | email-validator==1.1.1
5 | Flask==1.0.2
6 | Flask-Bootstrap==3.3.7.1
7 | Flask-WTF==0.14.3
8 | idna==2.10
9 | itsdangerous==1.1.0
10 | Jinja2==2.11.2
11 | MarkupSafe==1.1.1
12 | visitor==0.1.3
13 | Werkzeug==1.0.1
14 | WTForms==2.3.3
--------------------------------------------------------------------------------
/day61/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {% block title %}{% endblock %}
6 |
13 |
14 |
15 | {% block content%}{% endblock %}
16 |
17 |
--------------------------------------------------------------------------------
/day61/templates/denied.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 | {% block title %}Denied{% endblock %}
4 |
5 | {% block content %}
6 |
11 | {% endblock %}
--------------------------------------------------------------------------------
/day61/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 | {% block title %}Secrets{% endblock %}
4 |
5 | {% block content %}
6 |
7 |
8 |
Welcome
9 |
Are you ready to discover my secret?
10 |
Login
11 |
12 |
13 | {% endblock %}
--------------------------------------------------------------------------------
/day61/templates/login.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block title %}
5 | Login
6 | {% endblock %}
7 |
8 | {% block content %}
9 |
10 |
Login
11 | {{ wtf.quick_form(form) }}
12 |
13 | {% endblock %}
--------------------------------------------------------------------------------
/day61/templates/success.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 | {% block title %}Success{% endblock %}
4 |
5 | {% block content %}
6 |
11 | {% endblock %}
--------------------------------------------------------------------------------
/day62/README.md:
--------------------------------------------------------------------------------
1 | # Day 62 - Flask, WTForms, Bootstrap, and CSV - Coffee & Wifi Project
2 | ## Concepts Practised
3 | - Creating Forms with Flask-WTF
4 | - Adding Validation to Forms with Flask-WTF
5 | - Receiving Form Data with WTForms
6 | - Using Flask-Bootstrap as an Inherited Template
7 | ## Coffee & Wifi Project
8 | 
9 |
--------------------------------------------------------------------------------
/day62/cafe-data.csv:
--------------------------------------------------------------------------------
1 | Cafe Name,Location,Open,Close,Coffee,Wifi,Power
2 | Lighthaus,https://goo.gl/maps/2EvhB4oq4gyUXKXx9,11AM, 3:30PM,☕☕☕☕️,💪💪,🔌🔌🔌
3 | Esters,https://goo.gl/maps/13Tjc36HuPWLELaSA,8AM,3PM,☕☕☕☕,💪💪💪,🔌
4 | Ginger & White,https://goo.gl/maps/DqMx2g5LiAqv3pJQ9,7:30AM,5:30PM,☕☕☕,✘,🔌
5 | Mare Street Market,https://goo.gl/maps/ALR8iBiNN6tVfuAA8,8AM,1PM,☕☕,💪💪💪,🔌🔌🔌
--------------------------------------------------------------------------------
/day62/requirements.txt:
--------------------------------------------------------------------------------
1 | click==7.1.2
2 | dominate==2.5.2
3 | Flask==1.1.2
4 | Flask-Bootstrap==3.3.7.1
5 | Flask-WTF==0.14.3
6 | itsdangerous==1.1.0
7 | Jinja2==2.11.2
8 | MarkupSafe==1.1.1
9 | visitor==0.1.3
10 | Werkzeug==1.0.1
11 | WTForms==2.3.3
12 |
--------------------------------------------------------------------------------
/day62/static/css/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #333;
3 | color: white;
4 | }
5 |
6 | a {
7 | color: #ffc107;
8 | }
9 |
10 | .jumbotron {
11 | display: flex;
12 | align-items: center;
13 | margin: 0;
14 | height: 100vh;
15 | color: white;
16 | background-color: #333;
17 | }
18 |
19 | .space-above {
20 | margin-top: 20px;
21 | padding-top: 20px;
22 | }
23 |
--------------------------------------------------------------------------------
/day62/templates/add.html:
--------------------------------------------------------------------------------
1 | {% import 'bootstrap/wtf.html' as wtf %}
2 | {% extends 'bootstrap/base.html' %}
3 |
4 | {% block title %}Add A New Cafe{% endblock %}
5 | {% block styles %}
6 | {{super()}}
7 |
9 | {% endblock %}
10 |
11 | {% block content %}
12 |
13 |
14 |
15 |
16 |
Add a new cafe into the database
17 |
18 | {{ wtf.quick_form(form, novalidate=True) }}
19 |
20 |
See all cafes
21 |
22 |
23 |
24 |
25 |
26 | {% endblock %}
--------------------------------------------------------------------------------
/day62/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 | {% block title %}Coffee and Wifi{% endblock %}
4 |
5 | {% block styles %}
6 | {{super()}}
7 |
9 | {% endblock %}
10 |
11 | {% block content %}
12 |
13 |
14 |
☕️ Coffee & Wifi 💻
15 |
Want to work in a cafe but need power and wifi?
16 |
17 |
You've found the right place! Checkout my collection of cafes with data on power socket availability, wifi speed and coffee quality.
18 |
Show Me!
19 |
20 |
21 |
22 | {% endblock %}
23 |
--------------------------------------------------------------------------------
/day63/README.md:
--------------------------------------------------------------------------------
1 | # Day 63 - Databases and with SQLite and SQLAlchemy
2 | ## Concepts Practised
3 | - SQLite Databases
4 | - SQLAlchemy
5 | - CRUD Operations with SQLAlchemy
6 | - Build a SQLite Database into the Flask Website
7 | ## Virtual Bookshelf
8 | 
9 |
--------------------------------------------------------------------------------
/day63/templates/add.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Add Book
6 |
7 |
8 |
9 | Book Name
10 |
11 | Book Author
12 |
13 | Rating
14 |
15 | Add Book
16 |
17 |
18 |
--------------------------------------------------------------------------------
/day63/templates/edit_rating.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Edit Rating
6 |
7 |
8 |
9 | Book Name: {{book.title}}
10 | Current Rating {{book.rating}}
11 |
12 |
13 | Change Rating
14 |
15 |
16 |
--------------------------------------------------------------------------------
/day63/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Library
6 |
7 |
8 | My Library
9 | {% if books == []: %}
10 | Library is empty.
11 | {% endif %}
12 |
13 | {% for book in books %}
14 |
15 | Delete
16 | {{book.title}} - {{book.author}} - {{book.rating}}/10
17 | Edit Rating
18 |
19 | {% endfor %}
20 |
21 | Add New Book
22 |
23 |
--------------------------------------------------------------------------------
/day64/README.md:
--------------------------------------------------------------------------------
1 | # Day 64 - My Top 10 Movies Website
2 | ## Concepts Practised
3 | - SQLite Databases
4 | - SQLAlchemy
5 | - CRUD Operations with SQLAlchemy
6 | - Build a SQLite Database into the Flask Website
7 | - CSS & HTML
8 | ## My Top 10 Movies Website
9 | 
10 |
--------------------------------------------------------------------------------
/day64/templates/add.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 |
8 |
9 | {% endblock %}
10 |
11 | {% block title %}Add Movie{% endblock %}
12 |
13 | {% block content %}
14 |
15 |
Add a Movie
16 | {{ wtf.quick_form(form, novalidate=True) }}
17 |
18 | {% endblock %}
--------------------------------------------------------------------------------
/day64/templates/edit.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 |
8 |
9 | {% endblock %}
10 |
11 | {% block title %}Edit Movies{% endblock %}
12 |
13 | {% block content %}
14 |
15 |
{{movie.title}}
16 |
Edit Movie Rating
17 | {{ wtf.quick_form(form, novalidate=True) }}
18 |
19 | {% endblock %}
--------------------------------------------------------------------------------
/day64/templates/select.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 |
8 |
9 | {% endblock %}
10 |
11 | {% block title %}Select Movie{% endblock %}
12 |
13 | {% block content %}
14 |
23 | {% endblock %}
--------------------------------------------------------------------------------
/day65/README.md:
--------------------------------------------------------------------------------
1 | # Day 65 - How to Create a Website That People Will Love
2 | ## Concepts Practised
3 | - Color Theory
4 | - Typography and Choosing Fonts
5 | - UX Design
6 | ## Hotel Website
7 | 
8 |
--------------------------------------------------------------------------------
/day66/README.md:
--------------------------------------------------------------------------------
1 | # Day 66 - Building Your Own API with RESTful Routing
2 | ## Concepts Practised
3 | - HTTP Requests (GET, POST, PUT, PATCH, DELETE)
4 | - Postman Software
5 | - Publish API Documentation
6 | ## API with RESTful Routing
7 |
8 |
--------------------------------------------------------------------------------
/day66/cafes.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day66/cafes.db
--------------------------------------------------------------------------------
/day66/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Cafe&Wifi API
6 |
7 |
8 | Welcome to the Cafe & Wifi API
9 |
10 |
11 |
--------------------------------------------------------------------------------
/day67/README.md:
--------------------------------------------------------------------------------
1 | # Day 67 - Blog Capstone Project Part 3 - RESTful Routing
2 | ## Concepts Practised
3 | - Use GET for Blog Post Items
4 | - Use POST for a New Blog Post
5 | - Use DELETE for Blog Posts
6 | - Edit Existing Blog Posts
7 | ## Blog Capstone Project Part 3
8 | 
9 |
--------------------------------------------------------------------------------
/day67/posts.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/posts.db
--------------------------------------------------------------------------------
/day67/static/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/img/about-bg.jpg
--------------------------------------------------------------------------------
/day67/static/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/img/contact-bg.jpg
--------------------------------------------------------------------------------
/day67/static/img/edit-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/img/edit-bg.jpg
--------------------------------------------------------------------------------
/day67/static/js/clean-blog.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Start Bootstrap - Clean Blog v5.0.9 (https://startbootstrap.com/themes/clean-blog)
3 | * Copyright 2013-2020 Start Bootstrap
4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE)
5 | */
6 |
7 | !function(o){"use strict";o("body").on("input propertychange",".floating-label-form-group",function(i){o(this).toggleClass("floating-label-form-group-with-value",!!o(i.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")});if(992this.previousTop&&(o("#mainNav").removeClass("is-visible"),s a {
4 | color: $gray-900;
5 | &:focus,
6 | &:hover {
7 | text-decoration: none;
8 | color: $primary;
9 | }
10 | > .post-title {
11 | font-size: 30px;
12 | margin-top: 30px;
13 | margin-bottom: 10px;
14 | }
15 | > .post-subtitle {
16 | font-weight: 300;
17 | margin: 0 0 10px;
18 | }
19 | }
20 | > .post-meta {
21 | font-size: 18px;
22 | font-style: italic;
23 | margin-top: 0;
24 | color: $gray-600;
25 | > a {
26 | text-decoration: none;
27 | color: $gray-900;
28 | &:focus,
29 | &:hover {
30 | text-decoration: underline;
31 | color: $primary;
32 | }
33 | }
34 | }
35 | @media only screen and (min-width: 768px) {
36 | > a {
37 | > .post-title {
38 | font-size: 36px;
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/day67/static/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | // Variables
2 |
3 | $white: #fff !default;
4 | $gray-100: #f8f9fa !default;
5 | $gray-200: #e9ecef !default;
6 | $gray-300: #dee2e6 !default;
7 | $gray-400: #ced4da !default;
8 | $gray-500: #adb5bd !default;
9 | $gray-600: #868e96 !default;
10 | $gray-700: #495057 !default;
11 | $gray-800: #343a40 !default;
12 | $gray-900: #212529 !default;
13 | $black: #000 !default;
14 |
15 | $blue: #007bff !default;
16 | $indigo: #6610f2 !default;
17 | $purple: #6f42c1 !default;
18 | $pink: #e83e8c !default;
19 | $red: #dc3545 !default;
20 | $orange: #fd7e14 !default;
21 | $yellow: #ffc107 !default;
22 | $green: #28a745 !default;
23 | $teal: #0085A1 !default;
24 | $cyan: #17a2b8 !default;
25 |
26 | $primary: $teal !default;
27 | $secondary: $gray-600 !default;
28 | $success: $green !default;
29 | $info: $cyan !default;
30 | $warning: $yellow !default;
31 | $danger: $red !default;
32 | $light: $gray-100 !default;
33 | $dark: $gray-800 !default;
34 |
--------------------------------------------------------------------------------
/day67/static/scss/clean-blog.scss:
--------------------------------------------------------------------------------
1 | @import "variables.scss";
2 | @import "mixins.scss";
3 | @import "global.scss";
4 | @import "navbar.scss";
5 | @import "masthead.scss";
6 | @import "post.scss";
7 | @import "contact.scss";
8 | @import "footer.scss";
9 | @import "bootstrap-overrides.scss";
10 |
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/brands.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Brands';
7 | font-style: normal;
8 | font-weight: 400;
9 | font-display: block;
10 | src: url("../webfonts/fa-brands-400.eot");
11 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); }
12 |
13 | .fab {
14 | font-family: 'Font Awesome 5 Brands';
15 | font-weight: 400; }
16 |
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/brands.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/regular.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 400;
9 | font-display: block;
10 | src: url("../webfonts/fa-regular-400.eot");
11 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); }
12 |
13 | .far {
14 | font-family: 'Font Awesome 5 Free';
15 | font-weight: 400; }
16 |
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/regular.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400}
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/solid.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 900;
9 | font-display: block;
10 | src: url("../webfonts/fa-solid-900.eot");
11 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); }
12 |
13 | .fa,
14 | .fas {
15 | font-family: 'Font Awesome 5 Free';
16 | font-weight: 900; }
17 |
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/css/solid.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900}
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day67/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/day67/templates/make-post.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block content %}
5 | {% include "header.html" %}
6 |
7 |
24 |
25 |
26 |
27 |
28 | {{ ckeditor.load() }}
29 | {{ ckeditor.config(name='body') }}
30 | {{ wtf.quick_form(form, novalidate=True, button_map={"submit": "primary"}) }}
31 |
32 |
33 |
34 |
35 | {% include "footer.html" %}
36 | {% endblock %}
--------------------------------------------------------------------------------
/day67/templates/post.html:
--------------------------------------------------------------------------------
1 | {% include "header.html" %}
2 |
3 |
4 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | {{ post.body|safe }}
27 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | {% include "footer.html" %}
--------------------------------------------------------------------------------
/day68/README.md:
--------------------------------------------------------------------------------
1 | # Day 68 - Authentication with Flask
2 | ## Concepts Practised
3 | - Registering New Users
4 | - Salting Passwords
5 | - Hasing Passwords using Werkzeug
6 | - Authenticating Users with Flask-Login
7 | - Flask Flash Messages
8 | - Passing Authentication Status to Templates
9 | ## Flask Authentication Website
10 | 
11 |
--------------------------------------------------------------------------------
/day68/static/files/cheat_sheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day68/static/files/cheat_sheet.pdf
--------------------------------------------------------------------------------
/day68/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 | {% block content %}
3 |
4 |
11 |
12 | {% endblock %}
--------------------------------------------------------------------------------
/day68/templates/login.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 | {% block content %}
3 |
4 |
19 |
20 | {% endblock %}
--------------------------------------------------------------------------------
/day68/templates/register.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 | {% block content %}
3 |
4 |
5 |
Register
6 |
7 |
8 |
9 |
10 | Sign me up.
11 |
12 |
13 |
14 | {% endblock %}
--------------------------------------------------------------------------------
/day68/templates/secrets.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 | {% block content %}
3 |
4 |
5 | {% if name: %}
6 |
Welcome, {{ name }}!
7 |
Download Your File
8 | {% else: %}
9 |
Please register or login to view this page.
10 | {% endif %}
11 |
12 | {% endblock %}
--------------------------------------------------------------------------------
/day69/README.md:
--------------------------------------------------------------------------------
1 | # Day 69 - Blog Capstone Project Part 4 - Adding Users
2 | ## Concepts Practised
3 | - Registering New Users
4 | - Login Registered Users
5 | - Protect Routes (Login required, admin required)
6 | - Creating Relational Databases
7 | - Allow Any User to Add Comments to BlogPosts
8 | ## Blog Capstone Project Part 4
9 | 
10 |
--------------------------------------------------------------------------------
/day69/static/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/img/about-bg.jpg
--------------------------------------------------------------------------------
/day69/static/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/img/contact-bg.jpg
--------------------------------------------------------------------------------
/day69/static/img/edit-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/img/edit-bg.jpg
--------------------------------------------------------------------------------
/day69/static/js/clean-blog.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Start Bootstrap - Clean Blog v5.0.9 (https://startbootstrap.com/themes/clean-blog)
3 | * Copyright 2013-2020 Start Bootstrap
4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-clean-blog/blob/master/LICENSE)
5 | */
6 |
7 | !function(o){"use strict";o("body").on("input propertychange",".floating-label-form-group",function(i){o(this).toggleClass("floating-label-form-group-with-value",!!o(i.target).val())}).on("focus",".floating-label-form-group",function(){o(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){o(this).removeClass("floating-label-form-group-with-focus")});if(992this.previousTop&&(o("#mainNav").removeClass("is-visible"),s a {
4 | color: $gray-900;
5 | &:focus,
6 | &:hover {
7 | text-decoration: none;
8 | color: $primary;
9 | }
10 | > .post-title {
11 | font-size: 30px;
12 | margin-top: 30px;
13 | margin-bottom: 10px;
14 | }
15 | > .post-subtitle {
16 | font-weight: 300;
17 | margin: 0 0 10px;
18 | }
19 | }
20 | > .post-meta {
21 | font-size: 18px;
22 | font-style: italic;
23 | margin-top: 0;
24 | color: $gray-600;
25 | > a {
26 | text-decoration: none;
27 | color: $gray-900;
28 | &:focus,
29 | &:hover {
30 | text-decoration: underline;
31 | color: $primary;
32 | }
33 | }
34 | }
35 | @media only screen and (min-width: 768px) {
36 | > a {
37 | > .post-title {
38 | font-size: 36px;
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/day69/static/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | // Variables
2 |
3 | $white: #fff !default;
4 | $gray-100: #f8f9fa !default;
5 | $gray-200: #e9ecef !default;
6 | $gray-300: #dee2e6 !default;
7 | $gray-400: #ced4da !default;
8 | $gray-500: #adb5bd !default;
9 | $gray-600: #868e96 !default;
10 | $gray-700: #495057 !default;
11 | $gray-800: #343a40 !default;
12 | $gray-900: #212529 !default;
13 | $black: #000 !default;
14 |
15 | $blue: #007bff !default;
16 | $indigo: #6610f2 !default;
17 | $purple: #6f42c1 !default;
18 | $pink: #e83e8c !default;
19 | $red: #dc3545 !default;
20 | $orange: #fd7e14 !default;
21 | $yellow: #ffc107 !default;
22 | $green: #28a745 !default;
23 | $teal: #0085A1 !default;
24 | $cyan: #17a2b8 !default;
25 |
26 | $primary: $teal !default;
27 | $secondary: $gray-600 !default;
28 | $success: $green !default;
29 | $info: $cyan !default;
30 | $warning: $yellow !default;
31 | $danger: $red !default;
32 | $light: $gray-100 !default;
33 | $dark: $gray-800 !default;
34 |
--------------------------------------------------------------------------------
/day69/static/scss/clean-blog.scss:
--------------------------------------------------------------------------------
1 | @import "variables.scss";
2 | @import "mixins.scss";
3 | @import "global.scss";
4 | @import "navbar.scss";
5 | @import "masthead.scss";
6 | @import "post.scss";
7 | @import "contact.scss";
8 | @import "footer.scss";
9 | @import "bootstrap-overrides.scss";
10 |
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/brands.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Brands';
7 | font-style: normal;
8 | font-weight: 400;
9 | font-display: block;
10 | src: url("../webfonts/fa-brands-400.eot");
11 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); }
12 |
13 | .fab {
14 | font-family: 'Font Awesome 5 Brands';
15 | font-weight: 400; }
16 |
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/brands.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/regular.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 400;
9 | font-display: block;
10 | src: url("../webfonts/fa-regular-400.eot");
11 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); }
12 |
13 | .far {
14 | font-family: 'Font Awesome 5 Free';
15 | font-weight: 400; }
16 |
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/regular.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400}
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/solid.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face {
6 | font-family: 'Font Awesome 5 Free';
7 | font-style: normal;
8 | font-weight: 900;
9 | font-display: block;
10 | src: url("../webfonts/fa-solid-900.eot");
11 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); }
12 |
13 | .fa,
14 | .fas {
15 | font-family: 'Font Awesome 5 Free';
16 | font-weight: 900; }
17 |
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/css/solid.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | */
5 | @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900}
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day69/static/vendor/fontawesome-free/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/day69/templates/make-post.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block content %}
5 | {% include "header.html" %}
6 |
7 |
24 |
25 |
26 |
27 |
28 | {{ ckeditor.load() }}
29 | {{ ckeditor.config(name='body') }}
30 | {{ wtf.quick_form(form, novalidate=True, button_map={"submit": "primary"}) }}
31 |
32 |
33 |
34 |
35 | {% include "footer.html" %}
36 | {% endblock %}
--------------------------------------------------------------------------------
/day69/templates/register.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block content %}
5 | {% include "header.html" %}
6 |
7 |
8 |
21 |
22 |
23 |
24 |
25 |
26 | {{ wtf.quick_form(form, novalidate=True, button_map={"submit": "primary"}) }}
27 |
28 |
29 |
30 |
31 |
32 | {% include "footer.html" %}
33 | {% endblock %}
--------------------------------------------------------------------------------
/day70/README.md:
--------------------------------------------------------------------------------
1 | # Day 70 - Deploying Your Web Application with Heroku
2 | ## Concepts Practised
3 | - Version Control and Git
4 | - gunicorn and Heroku for hosting
5 | - Set up a WSGI server with gunicorn
6 | - Upgrade SQLite Database to PostgreSQL
7 | ## [Phillip's Blog](https://phillip-blog.herokuapp.com/)
8 | 
9 |
--------------------------------------------------------------------------------
/day71/README.md:
--------------------------------------------------------------------------------
1 | # Day 71 - Data Exploration with Pandas: College Major vs. Your Salary
2 | ## Concepts Practised
3 | - Data Cleaning with Pandas (.dropna())
4 | - Accessing Columns and Individual Cells in a Dataframe
5 | - Sorting Values & Adding Columns
6 | - Grouping and Pivoting Data with Pandas
7 | ## College Major vs. Salary Analysis
8 | 
9 |
--------------------------------------------------------------------------------
/day72/README.md:
--------------------------------------------------------------------------------
1 | # Day 72 - Data Visualisation with Matplotlib: Programming Languages
2 | ## Concepts Practised
3 | - Data Cleaning: Working with Time Stamps
4 | - Data Manipulation: Pivoting DataFrames
5 | - Data Visualisation with Matplotlib
6 | - Multi-Line Charts with Matplotib
7 | - Smoothing out Time-Series Data
8 | ## Programming Language Data Analysis
9 | 
10 |
--------------------------------------------------------------------------------
/day73/README.md:
--------------------------------------------------------------------------------
1 | # Day 73 - Aggregate & Marge Data with Pandas: Analyse the Lego Dataset
2 | ## Concepts Practised
3 | - HTML Markdown
4 | - Pandas .agg() function
5 | - Superimposing Line Charts with Separate Axes
6 | - Scatter Plots
7 | - Multi-Line Charts with Matplotib
8 | - Merge DataFrames and Creating Bar Charts
9 | ## LEGO Dataset Analysis
10 | 
11 |
--------------------------------------------------------------------------------
/day73/assets/bricks.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day73/assets/bricks.jpg
--------------------------------------------------------------------------------
/day73/assets/lego_sets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day73/assets/lego_sets.png
--------------------------------------------------------------------------------
/day73/assets/lego_themes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day73/assets/lego_themes.png
--------------------------------------------------------------------------------
/day73/assets/rebrickable_schema.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day73/assets/rebrickable_schema.png
--------------------------------------------------------------------------------
/day74/Bitcoin Search Trend.csv:
--------------------------------------------------------------------------------
1 | MONTH,BTC_NEWS_SEARCH
2 | 2014-09,5
3 | 2014-10,4
4 | 2014-11,4
5 | 2014-12,4
6 | 2015-01,5
7 | 2015-02,4
8 | 2015-03,6
9 | 2015-04,3
10 | 2015-05,3
11 | 2015-06,3
12 | 2015-07,4
13 | 2015-08,3
14 | 2015-09,3
15 | 2015-10,3
16 | 2015-11,4
17 | 2015-12,5
18 | 2016-01,4
19 | 2016-02,4
20 | 2016-03,5
21 | 2016-04,3
22 | 2016-05,6
23 | 2016-06,6
24 | 2016-07,6
25 | 2016-08,6
26 | 2016-09,5
27 | 2016-10,5
28 | 2016-11,5
29 | 2016-12,6
30 | 2017-01,9
31 | 2017-02,8
32 | 2017-03,12
33 | 2017-04,5
34 | 2017-05,15
35 | 2017-06,13
36 | 2017-07,14
37 | 2017-08,22
38 | 2017-09,26
39 | 2017-10,25
40 | 2017-11,50
41 | 2017-12,100
42 | 2018-01,62
43 | 2018-02,52
44 | 2018-03,30
45 | 2018-04,25
46 | 2018-05,21
47 | 2018-06,18
48 | 2018-07,18
49 | 2018-08,20
50 | 2018-09,17
51 | 2018-10,14
52 | 2018-11,23
53 | 2018-12,19
54 | 2019-01,15
55 | 2019-02,15
56 | 2019-03,14
57 | 2019-04,19
58 | 2019-05,26
59 | 2019-06,26
60 | 2019-07,21
61 | 2019-08,17
62 | 2019-09,15
63 | 2019-10,16
64 | 2019-11,14
65 | 2019-12,14
66 | 2020-01,16
67 | 2020-02,18
68 | 2020-03,15
69 | 2020-04,15
70 | 2020-05,22
71 | 2020-06,13
72 | 2020-07,14
73 | 2020-08,16
74 | 2020-09,13
--------------------------------------------------------------------------------
/day74/README.md:
--------------------------------------------------------------------------------
1 | # Day 74 - Google Trends Data: Resampling and Visualising Time Series
2 | ## Concepts Practised
3 | - Data Exploration - Making Sense of Google Search Data
4 | - Data Cleaning - Resampling Time Series Data
5 | - Data Visualisation - Tesla Line Charts in Matplotlib
6 | - Using Locators and DateFormatters to generate Tick Marks on a Time Line
7 | - Data Visualisation - Bitcoin: Line Style and Markers
8 | - Data Visualisation - Unemployment: How to use Grids
9 | - Data Visualisation - Unemployment: The Effect of New Data
10 | ## Google Trends Analysis
11 | 
12 | 
13 | 
14 |
--------------------------------------------------------------------------------
/day75/README.md:
--------------------------------------------------------------------------------
1 | # Day 75 - Beautiful Plotly Charts & Analysing the Android App Store
2 | ## Concepts Practised
3 | - Removing NaN Values and Duplicates
4 | - Create Pie and Donut Charts
5 | - Extracting Nested Column Data using .stack()
6 | - Grouped Bar Charts and Box Plots with Plotly
7 | ## Android App Store Analysis
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/day76/README.md:
--------------------------------------------------------------------------------
1 | # Day 76 - Computation with NumPy and N-Dimensional Arrays
2 | ## Concepts Practised
3 | - Generating and Manipulating ndarrays
4 | - Broadcasting, Scalars and Matrix Multiplication
5 | - Manipulating Images as ndarrays
6 |
7 |
8 |
--------------------------------------------------------------------------------
/day76/yummy_macarons.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day76/yummy_macarons.jpg
--------------------------------------------------------------------------------
/day77/README.md:
--------------------------------------------------------------------------------
1 | # Day 77 - Linear Regression and Data Visualisation with Seaborn
2 | ## Concepts Practised
3 | - Filter on Multiple Conditions
4 | - Seaborn Data Visualisation: Bubble Charts
5 | - Floor Division: A Trick to Convert Years to Decades
6 | - Plotting Linear Regressions with Seaborn
7 | - scikit-learn to Run Regression
8 | ## Seaborn Regression Plot
9 |
10 |
--------------------------------------------------------------------------------
/day78/README.md:
--------------------------------------------------------------------------------
1 | # Day 78 - Analysing the Nobel Prize with Plotly, Matplotlib & Seaborn
2 | ## Concepts Practised
3 | - Updated Packages in Google Colab & Explored and Cleaned the Dataset
4 | - plotly Bar & Donut Charts: Analyse Prize Categories & Women Winning Prizes
5 | - Used Matplotlib to Visualise Trends over Time
6 | - A Choropleth Map and the Countries with the Most Prizes
7 | - Created Sunburst Charts for a Detailed Regional Breakdown of Research Locations
8 | ## Nobel Prize Analysis
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/day79/README.md:
--------------------------------------------------------------------------------
1 | # Day 79 - The Tragic Discovery of Handwashing: t-Tests & Distributions
2 | ## Concepts Practised
3 | - Preliminary Data Explored and Visualised Births & Deaths at Vienna Hospital
4 | - Analysed the Yearly Data Split By Clinic
5 | - Visualised Distributions and Tested for Statistical Significance
6 | ## Handwashing Analysis
7 |
8 |
--------------------------------------------------------------------------------
/day79/annual_deaths_by_clinic.csv:
--------------------------------------------------------------------------------
1 | year,births,deaths,clinic
2 | 1841,3036,237,clinic 1
3 | 1842,3287,518,clinic 1
4 | 1843,3060,274,clinic 1
5 | 1844,3157,260,clinic 1
6 | 1845,3492,241,clinic 1
7 | 1846,4010,459,clinic 1
8 | 1841,2442,86,clinic 2
9 | 1842,2659,202,clinic 2
10 | 1843,2739,164,clinic 2
11 | 1844,2956,68,clinic 2
12 | 1845,3241,66,clinic 2
13 | 1846,3754,105,clinic 2
14 |
--------------------------------------------------------------------------------
/day80/README.md:
--------------------------------------------------------------------------------
1 | # Day 80 - Capstone Project - Predict House Prices
2 | ## Concepts Practised
3 | - Analysed and explored the Boston house price data
4 | - Split data for training and testing
5 | - Ran a Multivariable Regression
6 | - Used data transformation to improve model performance
7 | - Used model to estimate a property price
8 | ## House Prices Analysis
9 |
10 |
--------------------------------------------------------------------------------
/day81/README.md:
--------------------------------------------------------------------------------
1 | # Day 81 - Text to Morse Code Converter
2 | ## Concepts Practised
3 | - Dictionaries
4 | - Procedures
5 | - Exception Handling
6 |
7 |
--------------------------------------------------------------------------------
/day82/README.md:
--------------------------------------------------------------------------------
1 | # Day 82 - Portfolio Website
2 | ## Concepts Practised
3 | - Rendering HTML Files with Flask
4 | - Use Website Templates to Speed Up Web Development
5 | - CSS Styling
6 | ## Portfolio Website
7 | 
8 |
--------------------------------------------------------------------------------
/day82/main.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template
2 |
3 |
4 | app = Flask(__name__)
5 |
6 |
7 | @app.route('/')
8 | def home_page():
9 | return render_template("index.html")
10 |
11 |
12 | if __name__ == "__main__":
13 | app.run(port=8080, debug=True)
--------------------------------------------------------------------------------
/day82/static/assets/css/images/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day82/static/assets/css/images/avatar.png
--------------------------------------------------------------------------------
/day82/static/assets/css/images/ie/grad0-15.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/day82/static/assets/css/images/overlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day82/static/assets/css/images/overlay.png
--------------------------------------------------------------------------------
/day82/static/assets/js/jquery.scrolly.min.js:
--------------------------------------------------------------------------------
1 | /* jquery.scrolly v1.0.0-dev | (c) @ajlkn | MIT licensed */
2 | (function(e){function u(s,o){var u,a,f;if((u=e(s))[t]==0)return n;a=u[i]()[r];switch(o.anchor){case"middle":f=a-(e(window).height()-u.outerHeight())/2;break;default:case r:f=Math.max(a,0)}return typeof o[i]=="function"?f-=o[i]():f-=o[i],f}var t="length",n=null,r="top",i="offset",s="click.scrolly",o=e(window);e.fn.scrolly=function(i){var o,a,f,l,c=e(this);if(this[t]==0)return c;if(this[t]>1){for(o=0;o
9 |
10 |
--------------------------------------------------------------------------------
/day87/cafes.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day87/cafes.db
--------------------------------------------------------------------------------
/day87/static/style.css:
--------------------------------------------------------------------------------
1 | /* This CSS file will need to be added to the styling of
2 | your web pages for the styles to be rendered. */
3 |
4 | body {
5 | background-color: #333;
6 | color: white;
7 | }
8 |
9 | a {
10 | color: #ffc107;
11 | }
12 |
13 | .jumbotron {
14 | display: flex;
15 | align-items: center;
16 | margin: 0;
17 | height: 100vh;
18 | color: white;
19 | background-color: #333;
20 | }
21 |
22 | .space-above {
23 | margin-top: 20px;
24 | padding-top: 20px;
25 | }
--------------------------------------------------------------------------------
/day87/templates/add.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 | {% import "bootstrap/wtf.html" as wtf %}
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 | {% endblock %}
8 | {% block title %}Add a New Cafe{% endblock %}
9 | {% block content %}
10 |
11 |
12 |
13 |
Add New Cafe
14 | {{ wtf.quick_form(form, novalidate=True) }}
15 |
16 |
17 |
18 |
19 | {% endblock %}
--------------------------------------------------------------------------------
/day87/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 | {% endblock %}
8 | {% block title %}Coffee and Wifi{% endblock %}
9 | {% block content %}
10 |
11 |
12 |
☕️ Coffee & Wifi 💻
13 |
Want to work in a cafe but need power and wifi?
14 |
15 |
You've found the right place! Checkout my collection of cafes with data on power socket availability, wifi
16 | speed and coffee quality.
17 |
All Cafes
18 |
Random Cafe
19 |
Search by Location
20 |
Add New Cafe
21 |
22 |
23 |
24 |
25 | {% endblock %}
--------------------------------------------------------------------------------
/day87/templates/update.html:
--------------------------------------------------------------------------------
1 | {% extends 'bootstrap/base.html' %}
2 |
3 |
4 | {% block styles %}
5 | {{ super() }}
6 |
7 | {% endblock %}
8 | {% block title %}Coffee and Wifi{% endblock %}
9 | {% block content %}
10 |
11 |
12 |
☕️ Coffee & Wifi 💻
13 |
Want to work in a cafe but need power and wifi?
14 |
15 |
You've found the right place! Checkout my collection of cafes with data on power socket availability, wifi
16 | speed and coffee quality.
17 |
All Cafes
18 |
Random Cafe
19 |
Search by Location
20 |
Add New Cafe
21 |
22 |
23 |
24 |
25 | {% endblock %}
--------------------------------------------------------------------------------
/day88/README.md:
--------------------------------------------------------------------------------
1 | # Day 88 - To Do Agenda App
2 | ## Concepts Practised
3 | - Create a Web Server with Flask
4 | - Use the Command Line on Windows and Mac
5 | - `__name__` and `__main__` : Special Attributes built into Python
6 | - Python Decorator Functions and the `@` Syntax
7 | - Flask URL Paths and the Flask Debugger
8 | - Rendering HTML Elements with Flask
9 | - Use Python Decorators to Style HTML Tags
10 | - Decorators with `*args` and `**kwargs`
11 | Create a Python Decorator
12 | ## To Do Agenda App
13 |
14 |
--------------------------------------------------------------------------------
/day88/db.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day88/db.sqlite
--------------------------------------------------------------------------------
/day89/README.md:
--------------------------------------------------------------------------------
1 | # Day 89 - Disappearing Text Writing App
2 | ## Concepts Practised
3 | - Creating Windows and Labels with Tkinter
4 | - Add a Count Down Mechanism
5 | - Use grid() to complete the User Interface
6 | - Continously Verify Entry Data to Notify User's Progress
7 | ## Type Flow App
8 | 
9 |
--------------------------------------------------------------------------------
/day90/README.md:
--------------------------------------------------------------------------------
1 | # Day 90 - Convert PDF to Audiobook
2 | ## Concepts Practised
3 | - Creating Windows and Labels with Tkinter
4 | - Use grid() to complete the User Interface
5 | - Use tkinter filedialog to select a PDF file
6 | - Use gTTS to convert text to speech
7 | ## Text to Speech
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/day91/README.md:
--------------------------------------------------------------------------------
1 | # Day 91 - Image to Color List
2 | ## Concepts Practised
3 | - Creating Windows and Labels with Tkinter
4 | - Use grid() to complete the User Interface
5 | - Use tkinter filedialog to select PDF a file
6 | - Convert RGB Code to Color Name
7 | ## Image to Color List
8 | 
9 |
--------------------------------------------------------------------------------
/day91/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day91/image.png
--------------------------------------------------------------------------------
/day92/README.md:
--------------------------------------------------------------------------------
1 | # Day 92 - Amazon Canada Web Scraper
2 | ## Concepts Practised
3 | - Finding and Selecting Particular Elements with BeautifulSoup
4 | - Finding and Selecting Elements on a Website with Selenium
5 | - Use BeautifulSoup to Scrape Website Data
6 | - Use Selenium to Scrape Website Data
7 | - Scraping a Live Website
8 | ## Amazon Canada Web Scraper
9 | 
10 |
--------------------------------------------------------------------------------
/day93/README.md:
--------------------------------------------------------------------------------
1 | # Day 93 - Google Dinosaur Game Bot
2 | ## Concepts Practised
3 | - Finding and Selecting Particular Pixcels and RGB with PyAutoGUI
4 | - Use PyWin32 for Fast Keyboard Press Response
5 | - Modify Logic to Adjust with Faster Speed
6 | ## Google Dinosaur Game Bot
7 | 
8 |
--------------------------------------------------------------------------------
/day94/README.md:
--------------------------------------------------------------------------------
1 | # Day 94 - Space Invaders
2 | ## Concepts Practised
3 | - Make a 2D Game With PyGame
4 | - Draw (blit) items on the screen
5 | - Organized Use of Classes
6 | - Handling User Input (Player's Actions)
7 | - Implementing Event Loops
8 | ## Space Invaders
9 | 
10 |
--------------------------------------------------------------------------------
/day94/assets/background-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/background-black.png
--------------------------------------------------------------------------------
/day94/assets/pixel_laser_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_laser_blue.png
--------------------------------------------------------------------------------
/day94/assets/pixel_laser_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_laser_green.png
--------------------------------------------------------------------------------
/day94/assets/pixel_laser_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_laser_red.png
--------------------------------------------------------------------------------
/day94/assets/pixel_laser_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_laser_yellow.png
--------------------------------------------------------------------------------
/day94/assets/pixel_ship_blue_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_ship_blue_small.png
--------------------------------------------------------------------------------
/day94/assets/pixel_ship_green_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_ship_green_small.png
--------------------------------------------------------------------------------
/day94/assets/pixel_ship_red_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_ship_red_small.png
--------------------------------------------------------------------------------
/day94/assets/pixel_ship_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day94/assets/pixel_ship_yellow.png
--------------------------------------------------------------------------------
/day95/README.md:
--------------------------------------------------------------------------------
1 | # Day 95 - Custom API
2 | ## Concepts Practised
3 | - API Endpoints and Making API Calls
4 | - Working with Responses: HTTP Codes, Exceptions & JSON Data
5 | - Using API to Check for Product Availability
6 | - Using API to Send Telegram Alerts/Messages
7 | ## Custom API
8 |
9 |
10 |
--------------------------------------------------------------------------------
/day96/README.md:
--------------------------------------------------------------------------------
1 | # Day 96 - An Online Shop
2 | ## Concepts Practised
3 | - Create a Web Server with Flask
4 | - URL Building with Flask
5 | - Flask URL Paths and the Flask Debugger
6 | - Python Decorator Functions and the `@` Syntax
7 | - Stripe API
8 | ## An Online Shop
9 | 
10 |
--------------------------------------------------------------------------------
/day96/public/cancel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Checkout canceled
5 |
6 |
7 |
8 |
9 | Forgot to add something to your cart? Shop around then come back to pay!
10 | Return to checkout
11 |
12 |
13 |
--------------------------------------------------------------------------------
/day96/public/checkout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Phillip's Product Page
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Phillip's Basic Product Page
15 | $777.77
16 |
17 |
18 |
19 | Checkout
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/day96/public/success.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Thanks for your order!
5 |
6 |
7 |
8 |
9 |
10 | We appreciate your business! Your payment has gone through successfully!
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/day96/requirements.txt:
--------------------------------------------------------------------------------
1 | certifi==2021.5.30
2 | chardet==4.0.0
3 | Click==8.0.1
4 | Flask==2.0.1
5 | idna==3.2
6 | itsdangerous==2.0.1
7 | Jinja2==3.0.1
8 | MarkupSafe==2.0.1
9 | requests==2.26.0
10 | stripe==3.0.0
11 | toml==0.10.2
12 | Werkzeug==2.0.1
13 | Werkzeug==2.0.1
--------------------------------------------------------------------------------
/day96/server.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, redirect
2 | import stripe
3 |
4 |
5 | stripe.api_key = '************************************************************'
6 |
7 | app = Flask(__name__,
8 | static_url_path='',
9 | static_folder='public')
10 |
11 | YOUR_DOMAIN = 'http://localhost:4242'
12 |
13 |
14 | @app.route('/create-checkout-session', methods=['POST'])
15 | def create_checkout_session():
16 | try:
17 | checkout_session = stripe.checkout.Session.create(
18 | line_items=[
19 | {
20 | 'price': '*****************************',
21 | 'quantity': 1,
22 | },
23 | ],
24 | mode='payment',
25 | success_url=YOUR_DOMAIN + '/success.html',
26 | cancel_url=YOUR_DOMAIN + '/cancel.html',
27 | )
28 | except Exception as e:
29 | return str(e)
30 |
31 | return redirect(checkout_session.url, code=303)
32 |
33 |
34 | if __name__ == '__main__':
35 | app.run(port=4242)
--------------------------------------------------------------------------------
/day97/README.md:
--------------------------------------------------------------------------------
1 | # Day 97 - Percentage Calculator
2 | ## Concepts Practised
3 | - Mathematical Operations in Python
4 | - Calling Procedures for Different Calculations
5 | - Number Manipulation and F Strings in Python
6 | - Control Flow with if / else and Conditional Operators
7 | ## Percentage Calculator
8 | 
9 |
--------------------------------------------------------------------------------
/day98/README.md:
--------------------------------------------------------------------------------
1 | # Day 98 - Analyzing and Visualizing the Space Race
2 | ## Concepts Practised
3 | - Multi-Line Charts with Matplotib
4 | - Removing NaN Values and Duplicates
5 | - Create Pie and Donut Charts
6 | - Grouped Bar Charts and Box Plots with Plotly
7 | ## Space Race Data
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/day99/Deaths_by_Police_US.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day99/Deaths_by_Police_US.csv
--------------------------------------------------------------------------------
/day99/Median_Household_Income_2015.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day99/Median_Household_Income_2015.csv
--------------------------------------------------------------------------------
/day99/Pct_Over_25_Completed_High_School.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day99/Pct_Over_25_Completed_High_School.csv
--------------------------------------------------------------------------------
/day99/Pct_People_Below_Poverty_Level.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/phillipai/100-days-of-code-python/0ec1f5c2f53d202394bc2d662e4adaffe1cdb566/day99/Pct_People_Below_Poverty_Level.csv
--------------------------------------------------------------------------------
/day99/README.md:
--------------------------------------------------------------------------------
1 | # Day 99 - Analyzing Deaths Involving Police in the United States
2 | ## Concepts Practised
3 | - Removing NaN Values and Duplicates
4 | - Create Pie and Donut Charts
5 | - Grouped Bar Charts and Box Plots with Plotly
6 | - Data Cleaning: Working with Time Stamps
7 | ## Deaths Involving Police in the United States
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------