New course! Every coder should learn Generative AI!
Try a free lesson+ 2
In python, input() will ask for user input (the message you see when you click on run).
You are trying to assign variables with input and that doesn‘t work.
Are you trying to make a calculator by any chance, Somya Sarathi Samal ?
+ 3
That‘s fine, Somya Sarathi Samal . If you‘re a beginner, I‘d recommend taking a look at this page:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2426/
Hope this helps 😊
+ 1
No error, just type each input in a seperated line when you run the program
+ 1
Nothing. Your problem probably is that sololearn takes all the inputs at once; therefore you have to type them all in at once with a line break, like this:
input1
input2
+ 1
Hi.
Following the hint from Airree and converting your input given to a number will do the trick.
s = float(num1) + float(x)
Hope that helps. cheers. C