Skip to content

Instantly share code, notes, and snippets.

View jamisonsallis's full-sized avatar

jamisonsallis

View GitHub Profile
@jamisonsallis
jamisonsallis / Lesson_10 homework
Created February 2, 2026 04:42
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.
@jamisonsallis
jamisonsallis / Lesson_9 homework
Created February 2, 2026 04:31
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.
# Empty dictionary first
friends = {}
friends['alice@email.com'] = 'Alice'
@jamisonsallis
jamisonsallis / Lesson_8 homework
Last active February 2, 2026 04:14
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 say_hello():
print("Hello")
say_hello()
# ----------------------------------------------------------------------------------------------------------------------
@jamisonsallis
jamisonsallis / Lesson_7 homework
Created February 2, 2026 03:51
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
@jamisonsallis
jamisonsallis / Lesson_6 homework
Created February 2, 2026 03:41
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
@jamisonsallis
jamisonsallis / Lesson_4 homework.py
Created February 1, 2026 21:27
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!".
temperature = int(input("Enter the temperature in Fahrenheit: "))
@jamisonsallis
jamisonsallis / Lesson_3 homework.py
Created December 21, 2025 02:45
Lesson_3 Homework
# Homework Lesson 2 - 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"
@jamisonsallis
jamisonsallis / Lesson_2 Homework.py
Created December 21, 2025 00:13
Lesson 2 Homework
# ---------------------------------------------------------------------
# Exercise 1 - Travel Distance
# Alex is planning a road trip and wants to know the total distance
# he will be driving. He will travel at an average speed of 60 miles
# per hour and has 4 hours available for driving. Calculate the
# total distance he can cover and print the result.
average_speed = 60
hours_available = 4
total_distance = average_speed * hours_available # calculate here