Difference between revisions of "Coursera - Getting started with Python"

From MyWiki
Jump to: navigation, search
Line 1: Line 1:
# '''Python commands'''
+
'''Python commands'''
 
   
 
   
 
* quit()  or  ctrl + Z  or exit() -ends Python on Windows.
 
* quit()  or  ctrl + Z  or exit() -ends Python on Windows.
Line 5: Line 5:
 
* quit()  or  ctrl + C -Kills Python process on Mac and GNU/Linux.
 
* quit()  or  ctrl + C -Kills Python process on Mac and GNU/Linux.
  
# '''Conditional Steps, repeated steps, loop'''
+
'''Conditional Steps, repeated steps, loop'''
  
 
* ''' Conditional Steps - if ... elif .. else'''
 
* ''' Conditional Steps - if ... elif .. else'''

Revision as of 22:33, 13 November 2015

Python commands

  • quit() or ctrl + Z or exit() -ends Python on Windows.
  • quit() or ctrl + D -Tells "End Of File" to Python on Mac and GNU/Linux.
  • quit() or ctrl + C -Kills Python process on Mac and GNU/Linux.

Conditional Steps, repeated steps, loop

  • Conditional Steps - if ... elif .. else
    if (expression):
       (command)
    elif (expression):
       (command)
    else:
       (command)