+ 1
What's wrong with my program?
Fruit = input() Day = input() Kilo = float(input()) If fruit == 'banana' and day == 'Monday' or 'Tuesday' or 'Wednesday' or 'Thursday' or 'Friday': Print(kilo*2.50) Elif fruit == 'banana' and day == 'Saturday' or 'Sunday': Print(kilo*2.70) Else: Print(error)
6 Answers
+ 6
Fruit = input()
Day = input()
Kilo = float(input())
if Fruit == 'banana' and Day in ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']:
print(Kilo*2.50)
elif Fruit == 'banana' and Day in ['Saturday', 'Sunday']:
print(Kilo*2.70)
else:
print("Error")
+ 1
BEN_10 I apologize for my illiterate presentation of my code. But if you do not look at the margins and uppercase and lowercase letters, and look for an error in the program, I can not understand why the program gives me only the first print, despite the input
+ 1
BEN_10 , andriy kan , thank you for your help!
0
BEN_10 input banana Sunday 4, outputs 10, not 10.8