Jul-03-2018, 06:18 AM
(This post was last modified: Jul-03-2018, 06:18 AM by Zombie_Programming.)
(Jul-03-2018, 06:01 AM)buran Wrote: We were told to use eval() since int() and float() do not iterate.I'm not sure what you mean by
int() and float() do not iterate
I miss spoke by saying iterate, what I meant to say that having a user input numbers, like in the program the person was trying to do here, doing it with by saying something like
a,b = int(input('Enter A and B: "))
will produce this error. Error:Traceback (most recent call last):
File "C:\Users\bagpi\Desktop\test.py", line 1, in <module>
a,b = int(input("Enter A and B: "))
ValueError: invalid literal for int() with base 10: '1,2'