0
I can't get this input can anybody help?
7 ответов
+ 6
name = input()
without space
and in line 12: money = int(input())
+ 3
TheGolden Apple it means, that money != ""
0
It only says I don't have enough money
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...
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
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")