I want to calculate a!. Why can't I assign x und how can I make phyton accept my input ()=a? I am confused | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

I want to calculate a!. Why can't I assign x und how can I make phyton accept my input ()=a? I am confused

https://code.sololearn.com/cMFMpuE082d0/?ref=app

19th May 2019, 6:00 PM
Julia
2 Antworten
+ 2
Assigning variables does not work in programming like it works in real maths. That's why, like Airree already told, you can't do this: (a*b) = x But you can do any of these: x = a*b a = x/b b = x/a Which would mean the same thing in maths. You should also have an exit condition when using while loops. Which means you should change atleast on variable used in the while loop's expression in the while loop's code block.
19th May 2019, 7:05 PM
Seb TheS
Seb TheS - avatar
0
First of all, You can't assign like this: (a*b) = x You should do it like this: x = a * b Then, i can't understand what do you mean by input, because there is no input
19th May 2019, 6:15 PM
Airree
Airree - avatar