This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Homework Lesson 2 - Numbers - Homework | |
# 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 | |
# and $3. Calculate and print the total cost. |