How to make a program to solve addition by getting input by user in python | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to make a program to solve addition by getting input by user in python

2nd Jan 2017, 5:31 PM
Shailesh Tripathi
Shailesh Tripathi - avatar
3 ответов
0
Raw_input = (' what is 3 plus 3: a) 5 b)6') this is a more complicated way on websites like repl.it
5th Jan 2017, 10:44 PM
Charles
0
R00T, are you aware that your code doesn't work? I barely had a look over it and already spotted a mistake. Print(x+y) lol that would give 11 if the inputs were 1 and 1, or 35 if the inputs were 3 and 5 etc... you should've used x=int(input("plz enter the 1st num")) and the same for y.. plus as the Russian guy said, your loop is useless, what would you think of this code: while True: x=5 print (x) break
9th Jan 2017, 3:37 AM
ramzi
ramzi - avatar
0
well Well Well if I can help you guys making things clear... I saw that code on codeacademy as Well and it is The better way to make a full calculation programme in my opinion. The thing is you can add functions that Will perform an input format and check and The loop is Useful so The user could exit The programme with a special command with a if statement . Root your way of explaining things is shitty as fuck you could do The whole code or do nothing you cant do half The work and then say what people should unserstand. lol you've should have explain more precisely or dont answer at all. ramzy and The other Guy (dude we cant call your by your Nick since you have it in cyrillic), What I dont unserstand more is the hostility in your answers guys , its like you wanted to crush him cause he had a different way of doing things. thats weird. I mean, come on, you could be nicer your way of answering if verry disrepecful I agree with root here.
10th Jan 2017, 11:34 AM
samuel prefere
samuel prefere - avatar