def show_ad():
print(“———“)
print(“SALE! 50% OFF!”)
print(“———“)
def show_content():
print(“BREAKING NEWS!”)
print(“Two baby pandas born”)
print(“at our Zoo!”)
show_ad()
show_content()
show_ad()
def show_ad():
print(“———“)
print(“SALE! 50% OFF!”)
print(“———“)
def show_content():
print(“BREAKING NEWS!”)
print(“Two baby pandas born”)
print(“at our Zoo!”)
show_ad()
show_content()
show_ad()
try:
initial_balance = int(input(“Initial Balance? “))
except ValueError:
print(“Invalid input, exiting … “)
exit()
RATE = 1.1
for year in range(3):
print(f”Year {year}: {initial_balance * RATE ** year:,.2f}”)
while ”:
command = int(input(“Select 1, 2, 3 (0: Exit) “))
match command:
case 1:
print(“Menu 1”)
case 2:
print(“Menu 2”)
case 3:
print(“Menu 3”)
case 0:
break
case _:
print(“Invalid command, try again”)
continue
print(“Menu processed correctly”)
while 1 == 1:
command = int(input(“Select 1, 2, 3 (0: Exit) “))
match command:
case 1:
print(“Menu 1”)
case 2:
print(“Menu 2”)
case 3:
print(“Menu 3”)
case 0:
break
case _:
print(“Invalid command, try agein”)
continue
print(“Menu processed correctly”)
while 1 == 1:
command = int(input(“Select 1, 2, 3 (0: Exit) “))
match command:
case 1:
print(“Menu 1”)
case 2:
print(“Menu 2”)
case 3:
print(“Menu 3”)
case 0:
pass
command = int(input(“Select 1,2,3 (0: Exit)”))
while command != 0:
match command:
case 1:
print(“Menu 1”)
case 2:
print(“Menu 2”)
case 3:
print(“Menu 3”)
command = int(input(“Select 1,2,3 (0: Exit)”))
initial_balance = int(input(“Initial Balance? “))
RATE = 1.1
for i in range(3):
if i != 0:
initial_balance += 10_000
for year in range(3):
print(f”Year {year}: {initial_balance * RATE ** year:,.2f}”)
initial_balance = int(input(“Initial Balance? “))
RATE = 1.1
for year in range(10):
print(f”Year {year}: {initial_balance * RATE ** year:,.2f}”)
for i in range(8, 5, -1):
print(f”{i} Hello!”)
initial_balance = int(input(“Initial Balance? “))
match initial_balance:
case n if n >= 100_000:
RATE = 1.1
case n if n >= 80_000:
RATE = 1.08
case n if n >= 60_000:
RATE = 1.06
case _:
RATE = 1.01
print(f”Current rate: {RATE:.2f}”)
print(f”Year 0: {initial_balance:,.2f}”)
print(f”Year 1: {initial_balance * RATE:,.2f}”)
print(f”Year 2: {initial_balance * RATE * RATE:,.2f}”)