REMEMBER PYTHON

MINTE9
2REMEMBER




Script mode

p37 In interactive mode you interact directly with the interpreter. For scripts with more lines, the code can be saved in a file.py ! There are differences between the two modes can be confunsing. For example, in file you must you print a statement.
 
>>> miles = 26.2
>>> miles * 1.61
42.182
... 3 lines
˄˄˄
 
# var/www/python/calculator.py

miles = 26.2
miles * 1.61  # nothing!
print (miles * 1.61)
... 4 lines
˄˄˄
 
$ python calculator.py

42.182
... 2 lines
˄˄˄

Questions    
No. 9   Debugging
CARD
08
32

        A B C D E F
🔔
1/1