+ 1
What is error in this code ,please help me
6 odpowiedzi
+ 8
Pulkit soni I'll just paste my answer to another question here, maybe it helps.
You'll usually use one of the following two types of programs to run your Python code:
1) interactive shell like iPython, IDLE, python in a console session etc.
2) IDE like Spyder, Jupyter, PyCharm etc.
An interactive shell expects your input line by line. It usually shows some kind of prompt like >>> or In [1]: informing you that it is waiting for your input. When you type a variable's name and hit enter, the value of the variable will be printed. E.g.:
Python console session
>>> a = 5
>>> a
5
An IDE usually won't process your input line by line, but lets you write a script and will run the whole script once you press F5 or some other key. It will never output anything (well, except for error messages) unless you explicitly tell it to, using the print() command:
a = 5
a
If you run this script, nothing will happen. If you run THIS script:
a = 5
print(a)
, the output will be 5.
+ 3
>>> is only the command prompt of the python interpreter.
+ 2
You don't need >>>. Just write :
print(2 * 3)
+ 1
The same, >>> is useless. It is not a part of a python program. It is 'used' in IDLE but it is just the py interpreter. So write :
print("all you want")
In the python course, they never use >>>. Read it again.
0
But Théophile please solve this error
https://code.sololearn.com/c0ctw3K0zZIy/?ref=app
0
Anna thnx