Python Programming Lesson 1 of 10

python programming n.w
1 / 8
Embed
Share

Learn about writing simple Python programs, reading input from the keyboard, and using print statements with variables. Find and review starter programs, answer questions, and complete tasks in pairs to enhance your Python skills.

  • Python Programming
  • Lesson Objectives
  • Tasks in Pairs
  • Review
  • Coding

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Python Programming January 2018 Lesson 1 of 10

  2. Do Now in Pairs What does this code do? Show what will happen when you run the code here

  3. Lesson objectives In this lesson you will be: Writing simple Python programs Reading in input from the keyboard Writing print statements that include a variable You should be able to understand what print() and input() do and how to use them in a Python program by the end of this lesson

  4. Find the starter program Go to <SHARED AREA> and download starter_activity_sheet_1.py Save into your own area Run the program Does it do exactly what you thought it would do? If not, look at the differences and correct on the Do Now sheet

  5. Questions 5 minutes Answer the questions on the sheet (or in your exercise books) 1. How many variables can you find in this program and what are they being used for? 2. print() is a function that you can use to display to the screen. What other function is in this program and what does it do? 3. What is the + being used for in this program? 4. What happens when you use print() with nothing inside the brackets?

  6. Tasks in pairs 25 minutes 1. 2. Change the program so that it uses your name instead of Billy. Change the program so that it lets you type in your answer on the same line as the question. Change the program so that it asks the user what their name is at the beginning of the program Save your file (Save as ) with a new name and write a new program building on the first one. 4. Ask the user three questions, and each time give a suitable response: - What their name is - What they had for breakfast - What their favourite colour is Ask another person to test your program Next week we will make more intelligent responses! 3. Extension:

  7. Review There are FIVE mistakes in this Python code. Write down what you think they are (in pairs)

  8. Review answers! There are FIVE mistakes in this Python code. Write down what you think they are (in pairs)

More Related Content