+ 1

I'm having problem with writing a code using this format, what's might be wrong?

Input ("Enter a number: ") Enter a number: 5 When I run the code it's always an error

17th Jul 2020, 12:17 AM
Ikimi Daniel
Ikimi Daniel - avatar
2 Respostas
+ 4
You need to store the value read by input() function into a variable, for example, name = input("Your name: ") # this is stored as string age = int(input("Your age: ")) # this is stored as integer (whole number) salary = float(input("Your salary: ")) # this is stored as floating point (fractional number) It's also worth noting how SoloLearn takes input for codes, except for web codes. The below code shows how input works in SoloLearn: https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
17th Jul 2020, 12:45 AM
Ipang
+ 4
Can you post the entire code?
17th Jul 2020, 12:41 AM
PresidentOfYes12
PresidentOfYes12 - avatar