Skip to content

Instantly share code, notes, and snippets.

View Robertmorty36's full-sized avatar

Robertmorty36

View GitHub Profile
# 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.
# Create an empty dictionary
friends_dynamic = {}
# 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
@Robertmorty36
Robertmorty36 / homework Lesson 10.py
Created March 26, 2026 01:19
Homework Lesson 10
# Homework Lesson 10 - Workshop - Homework
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
################################################################################
### When solving coding challenges, think about the time complexity (Big O). ###
################################################################################
# Challenge 1
# Multiplication of a three-digit number
@Robertmorty36
Robertmorty36 / homework Lesson 8.py
Created March 26, 2026 00:28
Lesson 8 Homework
# Homework Lesson 8 - Workshop - Homework
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
# Challenge 1
# Two Lowest Elements
#
# Your task is to write a program that takes a list of numbers and finds
# the two smallest numbers in it. The two smallest numbers can be equal to
# each other or different.
@Robertmorty36
Robertmorty36 / Lesson 6 homework.py
Created March 25, 2026 23:51
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
Homework Lesson 5 - Workshop - Homework
# READ CAREFULLY THE EXERCISE DESCRIPTION AND SOLVE IT RIGHT AFTER IT
# Challenge 1
# Make a number Positive
#
# Create a variable called my_number and set it to any integer value.
# Write code to make the number positive if it's negative, and keep it
# as is if it's already positive or zero.
# 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!".
# 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!".
@Robertmorty36
Robertmorty36 / Homework Lesson 2
Created March 10, 2026 23:30
Homework Lesson 3
# 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"
@Robertmorty36
Robertmorty36 / Homework Lesson 2
Created February 25, 2026 00:15
Lesson 2 Homework
average_speed = 60
hours_available = 4
# Distance = Speed multiplied by Time
total_distance = average_speed * hours_available
print("The total distance Alex can cover is:")
print(total_distance)
The total distance Alex can cover is:
240
# Pizza Slices Sharing Exercise
pizza_slices = 8