Adding as many examples as I've converted so far.

This commit is contained in:
2022-12-10 17:18:44 -05:00
parent 0aa0875c42
commit 543bc78e51
21 changed files with 161 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
Build a program that requests the user's age, and return one of the following:
- <= 18 - You're a youngin'
- > 18 AND <= 35 - The early adult years
- > 35 AND <= 55 - Middle aged, time to buy a really expensive car
- > 55 AND <= 64 - Getting older...
- > 64 - Retirement! Time to live out the golden years

View File

@@ -0,0 +1,12 @@
age = int(input("Enter your age: "))
if age <= 18:
print("You're a youngin'")
elif age > 18 and age <= 35:
print("The early adult years")
elif age > 35 and age <= 55:
print("Middle aged, time to buy a really expensive car")
elif age > 55 and age <= 64:
print("Getting older...")
else:
print("Retirement! Time to live out the golden years.")