Introduction to Python: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
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. | ||
< | <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?") | ||
</ | </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'>
- 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>