Wiki Page, Summer Workshop Math and CS: CS: Python Programming - Input and Conditions

Wiki Page
2016-07-27T21:00:17-06:00

This week we will learn how to allow users to enter data into the program and how to process that data. We will also learn about conditions and logical operators.

Here is the suggested weekly schedule:

Monday:

Practice Inputs by completing lesson 3.2 in Pythonroom

Programming Challenge: Mad Libs

Write a new program called madlibs that allows users to input at least 10 values. At least one of the values must be a number. You will create a story based on those values. Be creative!

Tuesday

Learn how to create conditional statements by completing Lesson 3.3 in Pythonroom

Programming Challenge: Is it divisible?

Work with a peer and write a new program called divisible that allows users to input a number. Your program should display whether the number is divisible by 5, 3, and 2.

For instance, if the user enters the value 10, the program output should be something like:

Value introduced: 10
10 is divisible by 5
10 is not divisible by 3
10 is divisible by 2

Wednesday

Practice using conditional statements and variables.

Programming Challenge: Is it divisible? (Advanced)

Work with a peer and create a new program called divisible_v2 that allows users to input a number. Similar to yesterday's program, it should display whether the number is divisible by 5, 3, and 2... however, it should display just the divisible numbers in one single line.

For instance, if the user inputs the value 10, the program output should be something like:

Value introduced: 10
10 is divisible by 5 and 2.

If the user inputs the value 30, the program output should be something like:

Value introduced: 30
30 is divisible by 5, 3, and 2.

Thursday

Learn how to create While Loops by completing Lessons 5.1 in Pythonroom
Work with a peer finishing the "Cash Register" program in Lesson 5.2