0
Can someone help??
I'm having some trouble comprehending the whole 'input( )' function with python, especially as it pertains to the 'int( )' function. When I attempt to execute the command, it always results in an error. If I were to type for example: name = input("Major Grey") print = name age = int( input(36)) print = age It always gives me that EORerror message or whatever it is...like it goes haywire and its cursing me out with all the different symbols 😔
3 Respuestas
+ 2
M̘aj̼̦. Gͅr̪̗̦e̟̲y͙
name = input() is a string input
age = int(input()) is a integer input
so if you are using both you would type in the following in this order
Maj Grey
your age
not Maj Grey your age
Please use the searchbar before asking as this may help you find your answer faster and reduce duplicate questions.
Thanks and happy coding.
https://www.sololearn.com/discuss/2073742/?ref=app
https://www.sololearn.com/discuss/2488112/?ref=app
https://www.sololearn.com/discuss/1613902/?ref=app
https://www.sololearn.com/discuss/1558462/?ref=app
https://www.sololearn.com/discuss/2379246/?ref=app
https://www.sololearn.com/discuss/2439935/?ref=app
https://www.sololearn.com/discuss/26207/?ref=app
https://www.sololearn.com/discuss/1870995/?ref=app
+ 1
M̘aj̼̦. Gͅr̪̗̦e̟̲y͙
I believe you are looking for the word ' or '
https://code.sololearn.com/cVxggfugRCBg/?ref=app
0
,...I'm still confused, as you said it goes in the order of name, then age.
,...isnt that what I did???? By assigning a value to both 'name' and 'age' should they not be read out as:
Maj Grey
your age?
Mind you,...you're talking to a complete n00b,.. the first two links you so graciously provided kinda explained,..but the others are way beyond my level of understanding.