1 / 11

GCSE Computing

GCSE Computing. Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also learn how to use variables to store data for use in their progra ms. Python 3.3

jera
Télécharger la présentation

GCSE Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GCSE Computing Lesson 6

  2. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also learn how to use variables to store data for use in their programs.

  3. Python 3.3 We will be using Python 3.3 to learn the basic of programming and then have look at other languages if there is time. We will be using the IDLE Interface

  4. Python 3.3 Programming involves using a set of instructions, data and keywords to tell the computer what to do. Your first program type and then press enter >>> print(“Hello World”)

  5. Python 3.3 Which one of these is correct? >>> print"HelloWorld“ >>> print("Hello World"); >>> Print("Hello World") >>> print("Hel World") >>> prin(Hello World) Where do you look for errors? Syntax Errors Logical errors

  6. Python 3.3 Task Using a script – create a program that produces three lines of text.

  7. Python 3.3 Special characters in text

  8. Python 3.3 Variables Variables are containers that can hold data. In most languages variables are declared to be a certain data type first such as Strings, Integers, Dates, Real, Characters etc.. In python variables are declared when they have their first value assigned to them

  9. Python 3.3 Variables Try the following program print("Hello this is a variable program") name = "" name = input("Enter in your name please: ") print("Hello ", name)

  10. Python 3.3 Variables You can use variables to do calculations Try this program print("Hello this is a variable program") num1 = 0 num2 = 0 sum = 0 num1 = int(input("Enter in number 1 please: ")) num2 = int(input("Enter in number 2 please: ")) sum = num1 + num2 print("The total is ",sum)

  11. Python 3.3 Tasks Complete the Python 1 Worksheet

More Related