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
2 Réponses
+ 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.
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