Introduction to Python: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Created page with "This page highlights an approach to rapid on-boarding in Python programming. Sample files with a few concepts are presented. Participants type in the files and then examine...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This page highlights an approach to rapid on-boarding in Python programming.  Sample files with a few concepts are presented.  Participants type in the files and then examine the behaviour of the resulting programs, learning the effect of a few Python keywords each step.
This page highlights an approach to rapid on-boarding in Python programming.  Sample files with a few concepts are presented.  Participants type in the files and then examine the behaviour of the resulting programs, learning the effect of a few Python keywords each step.


<SyntaxHighlight lang="Python" line='line'>
<source lang="Python" line='line'>


#Quiz Program
#Quiz Program
Line 12: Line 12:
     print("What kind of an answer is that?")
     print("What kind of an answer is that?")


</SyntaxHighlight>
</source>

Latest revision as of 00:46, 30 November 2019

This page highlights an approach to rapid on-boarding in Python programming. Sample files with a few concepts are presented. Participants type in the files and then examine the behaviour of the resulting programs, learning the effect of a few Python keywords each step.

<source lang="Python" line='line'>

  1. Quiz Program

answer = input("What is the capital city of Guyana?") if answer == "Georgetown":

   print("Good answer")

elif answer == "GT":

   print("Ok.  We will accept that")

else:

   print("What kind of an answer is that?")

</source>