For -G7 programing language Teacher / Shamsa Hassan Alhassouni.

Slides:



Advertisements
Similar presentations
Review Algorithm Analysis Problem Solving Space Complexity
Advertisements

CIS Computer Programming Logic
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Python Repetition. We use repetition to prevent typing the same code out many times and to make our code more efficient. FOR is used when you know how.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
 Structure charts (last lesson)  Screen and page layout diagrams provide  A sketch of each page (screen) of the program  A list of the content, including.
Algorithms and Pseudocode
Getting Started With Python Brendan Routledge
Algorithms and Flowcharts
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Trace Tables In today’s lesson we will look at:
Writing algorithms Introduction to Python.
Lesson Objectives Aims To be able to write an algorithm in Pseudo Code
A451 Theory – 7 Programming 7A, B - Algorithms.
Lesson 1 - Sequencing.
Introducing Instructions
Entry Ticket: Algorithms and Program Construction
Lesson 1 An Introduction
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Computational Thinking
Computational Thinking
Iterations Programming Condition Controlled Loops (WHILE Loop)
Print slides for students reference
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Python I/O.
Use proper case (ie Caps for the beginnings of words)
Introduction to pseudocode
Algorithms & Pseudocode
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Night Sensor Lesson 2.
Loops CIS 40 – Introduction to Programming in Python
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Global Challenge Night Sensor Lesson 2.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Night Sensor Lesson 2.
Inputs and Variables Programming Guides.
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Walking for Water Lesson 2.
No Yes START Do you live in Scotland? Take umbrella See last Flowchart
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Flowcharts and Pseudo Code
ICT Gaming Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Fitness Friend Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Walking for Water Lesson 2.
Introduction to Python
Global Challenge Fitness Friend Lesson 2.
WJEC GCSE Computer Science
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Presentation transcript:

For -G7 programing language Teacher / Shamsa Hassan Alhassouni

What we will Learn today? Understand Flow chart – Algorithm and Pseudocode Understand text based games Understand Loops

Flow Charts & PSEUDOCODES

Flow Chart Flow Chart : is a diagram that shows a process , made up of boxes representing steps , decisions, input and output

Flow Chart

Activity / 1 Complete the flow chart using the following words: OUTPUT Start Complete the flow chart using the following words: OUTPUT INPUT START STOP DECISION Output Stop

Response stored in variable Activity /2 ------------------- ---------------- Enter a number Response stored in variable --------------- Is the num > 0 “number is positive” “number is negative” Yes No Complete the flow chart using the following words: OUTPUT INPUT START STOP DECISION

Response stored in variable Activity /2 Enter a number Response stored in variable Decision Is the num > 0 “number is positive” “number is negative” Yes No Start Complete the flow chart using the following words: OUTPUT INPUT START STOP DECISION Output Input Output Output Stop

Algorithm Algorithm: is sequence of instructions that are followed to complete a task. Two ways to represent Algorithm: flow chart - pseudocode

Pseudocode Psedudocode: is a way to represent the flow chart. It is a simple way to describe set of instructions that doesn’t have syntax. In pseudocode, INPUT asks a question. Output prints a message on the screen.

Activity /3 Write down the Psedudocode of the following program:

Text Based Games

Text Based Games Text based games : games that uses characters instead of images and animations.

Loops

Iteration / Loops Iteration : is the process of repeating steps. Two ways for Iteration : Count –controlled Condition controlled

Discover more through your practical activity NO Task Completed Not Completed 1 Open the python edu 2 Select ‘the existing project named (grade7-1) 3 Click file > new > python file 4 Give the python file a name. (L8 - loop) 5 Type the following: 6 Run your program and discuss the output 10 The program will not end – it will stuck because the

Discover more through your practical activity 6 change your program and discuss the output now 7 Write a loop that displays numbers 10 to 100 in steps of 5 8 Challenge: Write a program to allow the user to enter his password, if the password is wrong, he will have 3 tries.. But if a correct password is entered, the program should end.. 10

Password Program Code To stop the program if the correct password is entered

How easy did find the today’s lesson in python?