# Ask for the user's name
name = input("Enter your name: ")
# Check if the name is not "jerry"
if name.lower() != "jerry":
# Ask for the number of portions
portions = int(input("Enter number of portions: "))
# Calculate total cost
price_per_portion = 5.90
total_cost = portions * price_per_portion
# Print the total cost
print(f"Total cost: ${total_cost:.2f}")
else:
print("No need to pay, Jerry!")
Comments