Lesson 2 - Raw Input and Variables_Workbook
Lesson 2 - Raw Input and Variables_Workbook
Python Programming
input() Task Explained
QUESTIONS
1. Write down the name of a variable used in the above program
2. How many variables are used in the above program
3. What kind of character/symbol is used to assign values to a variable
4. Write down an example of assignment.
5. Steve is writing his first program below. It won’t run properly. Can you spot
the Syntax error?
Print(‘Hello World’)
Questions
5. Steve is writing his first program below. It won’t run properly. Can you
spot the Syntax error?
He forgot to add the plus sign before and after the variables in the
code.
Today’s Task
Do this program in SCRIPT mode
Task: Create a program in python that prompts the user for their name AND the names
of their top 5 favourite films. Each film should be assigned to a separate variable. When
run, the computer should output the following…
At the moment our Computing name doesn’t show spaces between the
results, how could you edit it to show spaces so that ‘BluePizzaMonkey’
becomes ‘Blue Pizza Monkey’?
Task: Create a program that asks the user three random questions and then gives them
their Computer Science classroom name based on their responses. For example,