Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 2.16 KB

File metadata and controls

48 lines (38 loc) · 2.16 KB

img

program control structures - if statements, loops and functions

meme

Intro

In this module, we will explore control structures in python (branching and looping) and functions

Resources

  1. Flow control
  2. IndentationError
  3. String formating
  4. Looping

Learning objectives

By the end of the session, you should be able to explain to anyone without the help of google the following concepts.

  • Why Python programming is awesome
  • Why indentation is so important in Python
  • How to use the if, if ... else statements
  • How to use comments
  • How to affect values to variables
  • How to use the while and for loops
  • How is Python’s for different from C‘s?
  • How to use the break and continues statements
  • How to use else clauses on loops
  • What does the pass statement do, and when to use it
  • How to use range
  • What is a function and how do you use functions
  • What does return a function that does not use any return statement
  • Scope of variables
  • What’s a traceback
  • What are the arithmetic operators and how to use them

Script Requirements

  • Allowed editors: vi, vim, emacs
  • All your files will be interpreted/compiled on Ubuntu 20.04 LTS using python3 (version 3.8.5)
  • All your files should end with a new line
  • The first line of all your files should be exactly #!/usr/bin/python3
  • Your code should use the pycodestyle (version 2.8.*)
  • All your files must be executable

Quizes

Quiz

back