0
Why doesn't this code work?
user=float(input("")) user2=float(input("")) def add(x,y): return x+y print(add(user,user2)) #I defined add and I'm trying to add the two user input's but it keeps saying "line 1 Value error: could not convert string to float" And it sucks because it messed up my entire calculator that was literally JUST working.
3 odpowiedzi
+ 1
I just checked your code, and it works.
What are you inputting? Maybe you are using , (comma) instead of . (dot) for floating numbers?
+ 1
what did you input?
0
I must've inputed something weird...Several times...it's working fine now. Thank you guys.