Python for Marion Coders : Lesson Set 2

Please complete Lesson Set 1 before doing this lesson set. ( Click here to go to lesson Set 1 )

This lesson set shows hot to use loops in programs and how to work with keyboard input.

  1. Lesson 6 Video:  How to use loops in programs
  2. Lesson 7 Video: Working with keyboard input from user
  3. Lesson 8 Video: User input - strings vs numbers
  4. Lesson 9 Video: User inputs a number to use in a loop

Python program example: Loops & keyboard input

Homework exercises: ( create program and post code in a Stakeroo message):

Excercise 1: Write a program that will display all of the numbers between 16 and 32.

Exercise 2: Write a program that will display all the odd numbers betwee 16 and 32.

Exercise 3: Write a program that will prompt your for a word and a number and then use a loop that will write the word as many times as the number. So if a user enters "Fred" and "15", it will print out "Fred" 15 times.