Skip to content

Instantly share code, notes, and snippets.

@milescanton
milescanton / homework.py
Created December 30, 2025 03:27
Homework 2
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from time import sleep
# get the path to the ChromeDriver executable
driver_path = ChromeDriverManager().install()
# create a new Chrome browser instance
@milescanton
milescanton / homework.py
Created December 18, 2025 02:25
Lesson 10 Homework
# Homework: Classes
# Read carefully until the end before you start solving the exercises.
# Practice the Basics
# Basic Class
# - Create an empty class HouseForSale
# - Create two instances.
# - Add number_of_rooms and price as instance attributes.
@milescanton
milescanton / homework.py
Created December 7, 2025 20:01
Lesson 9 Homework
# HOMEWORK: Dictionaries
# Read carefully until the end before you start solving the exercises.
# Basic Dictionary
# Create an empty dictionary and then add a few of your friends. Make the key their email (can be fake)
# and the value their name. When you're done, create the same dictionary as a pre-populated dictionary.
my_friends = {}
@milescanton
milescanton / homework.py
Created December 4, 2025 01:12
Lesson 8 Homework
# HOMEWORK: Functions
# Read carefully until the end before you start solving the exercises.
# Basic Function
# Define a basic function that only prints Hello. Create the definition using def and the call that executes it.
def print_hello():
print("Hello")
print_hello()
@milescanton
milescanton / homework.py
Created December 2, 2025 01:21
Lesson 7 Homework
# Homework: Loops
# 🔥Read carefully until the end before you start solving the exercises🔥
# Practice the Basics 💪🏻
# You can uncomment or type the necessary code on each task
# ---------------------------------------------------------------------
# Task 1. Create a basic for loop
@milescanton
milescanton / homework.py
Created November 21, 2025 03:43
Lesson 6 Homework
# Homework: Lists
# 🔥Read carefully until the end before you start solving the exercises🔥
# Practice the Basics 💪🏻
# Empty, Pre-populated, and Lists within Lists
# You can uncomment or type the necessary code on each task
@milescanton
milescanton / homework.py
Created November 15, 2025 23:15
Lesson 4 Homework
# Homework Lesson 4 - Conditionals
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
# ---------------------------------------------------------------------
# Exercise 1: Temperature Classification
# You're developing a weather application. Write a program that takes
# a temperature in Fahrenheit as input. If the temperature is above
# 85°F, print "Hot day ahead!".
@milescanton
milescanton / homework.py
Created November 13, 2025 23:45
Lesson 3 Homework
# Homework Lesson 3 - Strings
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
# ---------------------------------------------------------------------
# Exercise 1: Personalized Greeting
# Write a program that takes a user's name as input
# and then greets them using an f-string: "Hello, [name]!"
#
# Example Input: "Alice"
@milescanton
milescanton / homework.py
Created November 11, 2025 03:07
Lesson 2 Homework
# Homework Lesson 2 - Numbers - Homework
from lesson_4.homework import original_price, discount_percentage
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
# ---------------------------------------------------------------------
# Exercise 0 - This exercise is solved so you can have an ----------
# example of how we are expecting your answers to be.
#
# You are shopping online and found two items with prices $5.99