variables lesson tasks

Download Variables lesson tasks

If you can't read please download the document

Upload: eurythmic

Post on 27-Jul-2015

100 views

Category:

Education


0 download

TRANSCRIPT

1. Lesson Tasks PYTHON LESSON 2: VARIABLES 2. Choose a black card you think will be funny. Delete the others. 3. Choose the three funniest white cards that go with your black card. Delete the others. [Create your own card here if you like] 4. Get coding! 5. Try it out! Run your program using this icon: When you get the input box, type in one of the answers from the white cards on slide 3. Does it work as intended? If not, go back and check your code If it works, add comments to your code (remember comments explain your program and you start them with #). Then move on to the next slide 6. Add screenshot of your code here 7. Add screenshots of the output with all three of your white cards here 8. Questions for you to answer 1. What is the name of the variable in your code? 2. What does the variable do? 3. How do you get input from the program user? 4. How can we quickly identify variables when looking at our code? 5. How do we indicate which are our sentences and which are variables? 6. How do we join our variables to sentences? 9. Extension Tasks Can you work out how to ask the user their name and then say hello to them before starting the Complete the Sentence game? If you get this working, put a screenshot on the next slide. The variable in our code was called answer. Read here about naming variables and different data types and then summarise what you have learnt in your own words 10. Extension Code