Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson 1 An Introduction

Similar presentations


Presentation on theme: "Lesson 1 An Introduction"— Presentation transcript:

1 Lesson 1 An Introduction

2 What is Python? Python is a programming language that is often used to develop web applications. The creator of Python, Guido van Rossum named the language after the 1970s BBC Comedy series ‘Monty Python’s Flying Circus’

3 Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start Display “Computer” Display “Science” Display “Rocks” End

4 Flowcharts are used to plan programs before they are created.
The start or end of the program. There may be more than one way to complete the algorithm and there may be more than one end box. A process, that is doing something for example calculating something. An input or output, for example: Input num1 A decision, YES or NO, or a choice of paths, for example: Is it a weekday? A subroutine or self-contained program that can be used as required. When a flowchart will not fit onto a single page we use this shape to show how the sections of the flowchart connect together.

5 “What’s your name?” Strings
In programming we usually call normal text a string. “What’s your name?” A string is a collection of alphabetic and/or numeric characters. We tell the computer something is a string by putting quote marks around it.

6 Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory containing a value that can be accessed or changed. Name Think of a variable as a box with a label that you can store information in.

7 Match the Python code to the correct part of the flowchart.
Using Python Match the Python code to the correct part of the flowchart. Start Display “Computer” Display “Science” Display “Rocks” End

8 At the command line try typing in some of the following :
Python Open the Python 3.3 > IDLE Python GUI. At the command line try typing in some of the following : 3+4 5/6 9*5 Print (‘hello’) What happens?

9 Match the Python code to the correct part of the flowchart.
Example Match the Python code to the correct part of the flowchart. Start Input Name Display “Hello “ + name End Create a Python program based on the code above and save it as variables.py. Press F5 to run it.

10 The Turing Test Watch the video The Turing Test Click Here

11 Turing Test Simulator Create your own Turing Test Simulator
Use variables and IF statements

12 Python Challenges Now practice your sequencing skills by completing two of the Python Challenges. Choose two from challenges 1 to 5.


Download ppt "Lesson 1 An Introduction"

Similar presentations


Ads by Google