'F' → Fullscreen
Create a new Python program named 1-10-conditionals.
not.print("--- Booleans Are Values ---")
name = "Mr. Mortimer"age = 30balance = 150.00is_teacher = True
can_drive = age >= 16can_buy_car = balance > 31000
print(f"Is my name Mr. Mortimer? {name == 'Mr. Mortimer'}")print(f"Am I old enough to drive? {can_drive}")print(f"Can I afford the car? {can_buy_car}")print(f"Am I a teacher? {is_teacher}")print(f"Am I NOT a teacher? {not is_teacher}")
input("Press enter to continue...")print("--- Booleans Are Values ---")
name = "Mr. Mortimer"age = 30balance = 150.00is_teacher = True
can_drive = age >= 16can_buy_car = balance > 31000
print(f"Is my name Mr. Mortimer? {name == 'Mr. Mortimer'}")print(f"Am I old enough to drive? {can_drive}")print(f"Can I afford the car? {can_buy_car}")print(f"Am I a teacher? {is_teacher}")print(f"Am I NOT a teacher? {not is_teacher}")
input("Press enter to continue...")
print("--- Age Validator ---")
user_age = int(input("Enter your age: "))
if user_age >= 16: print("Time to hit the road! You've earned your driving permit.")
if user_age >= 18: print("Adulting 101: You can now vote and live independently.") print("Please exit your mom's basement.")
if user_age >= 35: print("You're old enough to run for president.") nick_name = input("What's your nickname (e.g., 'The Awesome')? ") print(f"{nick_name} for president!")
input("Press enter to continue...")print("--- Booleans Are Values ---")
name = "Mr. Mortimer"age = 30balance = 150.00is_teacher = True
can_drive = age >= 16can_buy_car = balance > 31000
print(f"Is my name Mr. Mortimer? {name == 'Mr. Mortimer'}")print(f"Am I old enough to drive? {can_drive}")print(f"Can I afford the car? {can_buy_car}")print(f"Am I a teacher? {is_teacher}")print(f"Am I NOT a teacher? {not is_teacher}")
input("Press enter to continue...")
print("--- Age Validator ---")
user_age = int(input("Enter your age: "))
if user_age >= 16: print("Time to hit the road! You've earned your driving permit.")
if user_age >= 18: print("Adulting 101: You can now vote and live independently.") print("Please exit your mom's basement.")
if user_age >= 35: print("You're old enough to run for president.") nick_name = input("What's your nickname (e.g., 'The Awesome')? ") print(f"{nick_name} for president!")
input("Press enter to continue...")
print("--- Score Calculator ---")
score = int(input("Enter your score (0-100): "))
if score >= 60: print("You passed!")
if score < 60: print("You did not pass. Keep studying!")
input("Press enter to continue...")andand, because "between 32 and 65" is really two conditions at once.print("--- Booleans Are Values ---")
name = "Mr. Mortimer"age = 30balance = 150.00is_teacher = True
can_drive = age >= 16can_buy_car = balance > 31000
print(f"Is my name Mr. Mortimer? {name == 'Mr. Mortimer'}")print(f"Am I old enough to drive? {can_drive}")print(f"Can I afford the car? {can_buy_car}")print(f"Am I a teacher? {is_teacher}")print(f"Am I NOT a teacher? {not is_teacher}")
input("Press enter to continue...")
print("--- Age Validator ---")
user_age = int(input("Enter your age: "))
if user_age >= 16: print("Time to hit the road! You've earned your driving permit.")
if user_age >= 18: print("Adulting 101: You can now vote and live independently.") print("Please exit your mom's basement.")
if user_age >= 35: print("You're old enough to run for president.") nick_name = input("What's your nickname (e.g., 'The Awesome')? ") print(f"{nick_name} for president!")
input("Press enter to continue...")
print("--- Score Calculator ---")
score = int(input("Enter your score (0-100): "))
if score >= 60: print("You passed!")
if score < 60: print("You did not pass. Keep studying!")
input("Press enter to continue...")
print("--- Temperature Check ---")
current_temp = int(input("What is the current temperature in Fahrenheit? "))
if current_temp <= 32: print("Brrr! It's freezing. Don't forget your coat!")
if current_temp > 32 and current_temp <= 65: print("It's a bit chilly. A light jacket should be perfect.")
if current_temp > 65: print("It's warm outside. Enjoy the nice weather!")
input("Press enter to continue...")and. Keep an eye on how repetitive this gets — the next activity fixes exactly that.print("--- Booleans Are Values ---")
name = "Mr. Mortimer"age = 30balance = 150.00is_teacher = True
can_drive = age >= 16can_buy_car = balance > 31000
print(f"Is my name Mr. Mortimer? {name == 'Mr. Mortimer'}")print(f"Am I old enough to drive? {can_drive}")print(f"Can I afford the car? {can_buy_car}")print(f"Am I a teacher? {is_teacher}")print(f"Am I NOT a teacher? {not is_teacher}")
input("Press enter to continue...")
print("--- Age Validator ---")
user_age = int(input("Enter your age: "))
if user_age >= 16: print("Time to hit the road! You've earned your driving permit.")
if user_age >= 18: print("Adulting 101: You can now vote and live independently.") print("Please exit your mom's basement.")
if user_age >= 35: print("You're old enough to run for president.") nick_name = input("What's your nickname (e.g., 'The Awesome')? ") print(f"{nick_name} for president!")
input("Press enter to continue...")
print("--- Score Calculator ---")
score = int(input("Enter your score (0-100): "))
if score >= 60: print("You passed!")
if score < 60: print("You did not pass. Keep studying!")
input("Press enter to continue...")
print("--- Temperature Check ---")
current_temp = int(input("What is the current temperature in Fahrenheit? "))
if current_temp <= 32: print("Brrr! It's freezing. Don't forget your coat!")
if current_temp > 32 and current_temp <= 65: print("It's a bit chilly. A light jacket should be perfect.")
if current_temp > 65: print("It's warm outside. Enjoy the nice weather!")
input("Press enter to continue...")
print("--- Letter Grade Calculator ---")
final_grade = int(input("Enter your final grade percentage (0-100): "))
if final_grade >= 90: print("You got an A! Excellent work!")if final_grade >= 80 and final_grade < 90: print("You got a B! Great job!")if final_grade >= 70 and final_grade < 80: print("You got a C. Solid effort.")if final_grade >= 60 and final_grade < 70: print("You got a D. You passed, but there's room to improve.")if final_grade < 60: print("You got an F. Let's review the material and try again.")Verify your program works correctly.
--- Booleans Are Values ---Is my name Mr. Mortimer? TrueAm I old enough to drive? TrueCan I afford the car? FalseAm I a teacher? TrueAm I NOT a teacher? FalsePress enter to continue...--- Age Validator ---Enter your age: 35 [Enter]Time to hit the road! You've earned your driving permit.Adulting 101: You can now vote and live independently.Please exit your mom's basement.You're old enough to run for president.What's your nickname (e.g., 'The Awesome')? Sleepy [Enter]Sleepy for president!Press enter to continue...--- Score Calculator ---Enter your score (0-100): 76 [Enter]You passed!Press enter to continue...--- Temperature Check ---What is the current temperature in Fahrenheit? 50 [Enter]It's a bit chilly. A light jacket should be perfect.Press enter to continue...--- Letter Grade Calculator ---Enter your final grade percentage (0-100): 66 [Enter]You got a D. You passed, but there's room to improve.Answer the following questions before submitting your work.
if statement's block?and instead of just one?Submit the required files to the appropriate dropbox.