0

I can't get this input can anybody help?

9th Aug 2020, 4:26 PM
TheGolden Apple
TheGolden Apple - avatar
7 Respostas
+ 6
name = input() without space and in line 12: money = int(input())
9th Aug 2020, 4:36 PM
Julia Shabanova
Julia Shabanova - avatar
+ 3
TheGolden Apple it means, that money != ""
9th Aug 2020, 4:49 PM
Julia Shabanova
Julia Shabanova - avatar
9th Aug 2020, 4:27 PM
TheGolden Apple
TheGolden Apple - avatar
0
It only says I don't have enough money
9th Aug 2020, 4:47 PM
TheGolden Apple
TheGolden Apple - avatar
0
TheGolden Apple money == (""): what this condition you mean? You are comparing intiger type with none empty string so never comes true. So else part will output.. Take valid condition like money!=0 : Or money >= 500 : You never calling 2 functions so there is no use of those 2 functions...
9th Aug 2020, 6:03 PM
Jayakrishna 🇮🇳
0
Can you please show me I coding? I wanted to make it like if I have enough money then what would you like? if not then you don't have enough money
10th Aug 2020, 4:34 AM
TheGolden Apple
TheGolden Apple - avatar
0
#you dont used function so i removed name=input("") if name == ("shehan"): print("hi! how are you?") else: print("who are you?") money =int(input("How much money you have :\n")) if money >=(500): print ("what would you like? ") else: print ("you dont have enough money") #TheGolden Apple #with using functions def say_hello_there(name): print(name + " hello") def say_money(money): print(" have money " + str(money)) name=input ("Enter name : ") say_hello_there(name) if name == ("shehan"): print("hi! how are you?") else: print("what do you want?") money =int(input("how much money you have :")) say_money(money) if money >=(500): print ("what would you like? ") else: print ("you dont have enough money")
11th Aug 2020, 1:39 PM
Jayakrishna 🇮🇳