SlideShare a Scribd company logo
1 of 60
Agenda of LO CS.1.11 W7-8
1- Warm up Revision 10 min
2- ppt teacher demonstrate about Python 15m
3- Video about Python 5min
4- Practical work Students divided in pairs and use
Anaconda : Spyder or on line Python platform to
create very simple program using python
-3.8.1 7
- Questions and answers as pretest about Python 5 m
8-Refelection 5 min
9- Home work 5 min
Python
Eng. & Educator Osama
Ghandour
LO CS.1.11 W7 :
Understand and interpret concept
the loop statements and give some
examples. • Students can design
programs involving loop
statements. • Gain knowledge and
understanding of function of the
loops inside the program. •
Students can compare between
Lesson plan
Python
Eng. & Educator Osama
Ghandour
Warm Up
Listen to this video
Offline
On line
Python
Eng. & Educator Osama
Ghandour
Warm up 5 min
1-Using logical operators and give
some examples.
2- using & Comparing between if
&switch statements and give some
examples.
3- Write the general syntax of the
conditional statements (if& switch).
Eng. & Educator Osama
Ghandour
Python
5
if
 If statement: Executes a group of
statements only if a certain condition is
true. Otherwise, the statements are
skipped.
 Syntax:
if condition:
statements
 Example:
gpa = 3.4
if gpa > 2.0:
print "Your application is accepted."
Eng. & Educator Osama
Ghandour
6
if/else
 if/else statement: Executes one block of statements if a certain
condition is True, and a second block of statements if it is False.
 Syntax:
if condition:
statements
else:
statements
 Example:
gpa = 1.4
if gpa > 2.0:
print "Welcome to Mars University!"
else:
print "Your application is denied."
 Multiple conditions can be chained with elif ("else if"):
if condition:
statements
elif condition:
statements
else:
statements Eng. & Educator Osama
Ghandour
7
while
 while loop: Executes a group of statements as long as a condition
is True.
 good for indefinite loops (repeat an unknown number of times)
 Syntax:
while condition:
statements
 Example:
number = 1
while number < 200:
print number,
number = number * 2
 Output:
1 2 4 8 16 32 64 128
Eng. & Educator Osama
Ghandour
8
Relational VS Logic
 Many logical expressions use relational operators:
 Logical expressions can be combined with logical operators:
 Exercise: Write code to display and count the factors of a number.
Operator Example Result
and 9 != 6 and 2 < 3 True
or 2 == 3 or -1 < 5 True
not not 7 > 0 False
Operator Meaning Example Result
== equals 1 + 1 == 2 True
!= does not equal 3.2 != 2.5 True
< less than 10 < 5 False
> greater than 10 > 5 True
<= less than or equal to 126 <= 100 False
>= greater than or equal to 5.0 >= 5.0 True
Eng. & Educator Osama Ghandour
functions
9
Eng. & Educator Osama
Ghandour
Further programming
• Lab exercises
– Let's go downstairs to the basement computer
labs!
• - learn prcticaly
• What next?
– Lists , Dictionaries , Algorithms etc.
Eng. & Educator Osama
Ghandour
Anaconda : Spyder or an on line Python platform
Inputs : 1- though console 2- input message 3- sensors 2- Dataset
Python – Cheat sheets
You can install python-2.7.17 or python-3.8.1
Write Program / Code
Eng. & Educator Osama
Ghandour
Python
Anaconda > Use Spyder
Eng. & Educator Osama
Ghandour
Python
Coding window – Ipython console - Variable explorer
Spyder
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
http://ide.geeksforgeeks.org/
Eng. & Educator Osama Ghandour
Essential Questions
• Essential Questions:
1- What is the function
of the loop statement?
2- What is the general
syntax of the loop
statements? Eng. & Educator Osama
Ghandour
Essential Questions
• Essential Questions:
3- Write a code to repeat a
text "Egypt" 5 times.
4- Write a code to display
the odd, even numbers
from 0 to 10 and their sum.
Eng. & Educator Osama
Ghandour
Essential Questions
• Essential Questions:
5- Write a code to
display the integer
numbers between 1 to
100 divisible by 7
Eng. & Educator Osama
Ghandour
Types of loops in python .
Listen to this video
Offline On line
Offline On line
Eng. & Educator Osama
Ghandour
Python
19
while
 while loop: Executes a group of statements as long as a condition
is True.
 good for indefinite loops (repeat an unknown number of times)
 Syntax:
while condition:
statements
 Example:
number = 1
while number < 200:
print number,
number = number * 2
 Output:
1 2 4 8 16 32 64 128
Eng. & Educator Osama
Ghandour
Iteration Loop structure
While
x=0
while (x<5):
print("Egypt" )
X=x+1
Eng. & Educator Osama
Ghandour
Types of loops in python .
Listen to this video
Offline On line
Offline On line
Eng. & Educator Osama
Ghandour
Python
For loop
sume = 0
sumo = 0
for x in range (11):
if x%2==0:
print (x , "is even number")
sume=sume+x
else :
print (x , "is odd number")
sumo=sumo+x
print (sume , "summestion of even numbers")
print (sumo , "summestion of odd numbers")
Eng. & Educator Osama
Ghandour
• 0 is even number
• 1 is odd number
• 2 is even number
• 3 is odd number
• 4 is even number
• 5 is odd number
• 6 is even number
• 7 is odd number
• 8 is even number
• 9 is odd number
• 10 is even number
• 30 summestion of even numbers
• 25 summestion of odd numbers
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Evidence of Learning:
Create a project with a
programming language
“Python” using different types
of Loops.
Eng. & Educator Osama
Ghandour
Connection to math
Eng. & Educator Osama
Ghandour
Create, interpret and analyze quadratic functions that model
real-world situations. W1-4
Key Concepts:
o 1. Quadratic Function
o 2. First and second differences
o 3. Completing the square
o 4. Complex numbers
o 5. Parabola
o 6. Focus
o 7. Argand diagram
o 8. related roots
Mechanics
Eng. & Educator Osama Ghandour
Learning Outcome: Use position, displacement, average and instantaneous velocity,
average and instantaneous acceleration to describe 1-dimensional motion of an object.
W1-3
Key Concepts:
o 1. Position /Time graphs
o 2. velocity/Time graphs
o 3. Acceleration /Time graphs
o 4. Relative velocity.
o 5. Instantaneous velocity
o 6. Average velocity
o 7. Reference Frames
Mechanics
Eng. & Educator Osama
Ghandour
Week 04 - Week 08
Learning Outcome: Use kinematic equations to
understand and predict 1-dimensional motion of objects
under constant acceleration,including vertical (free-fall)
motion under gravity.
Key Concepts:
 1. Area under a curve
 2. Kinematic equations for 1-D motion with constant
acceleration
 3. Free-fall motion
Physics
• . Fluids w1-3
• 2. Pressure
• 3. Manometer
• 4. Pressure gauge
• 5. Units of pressure
• 6. Effect of atmospheric pressure on boiling
point of water
• 7. Change in atmospheric pressure with altitude
• 8. Pressure difference and force
• 9. Archimedes Principle
Eng. & Educator Osama
Ghandour
Check your email to Solve the
Online auto answered
quiz 15 min after
school the quiz will be
closed in 10:00pm
after
tomorrowEng. & Educator Osama
Ghandour
Python
Repetition (loops) in
Python.
Listen to this video
Offline On line
Offline On line
Eng. & Educator Osama
Ghandour
Python
Read /write to Arduino pins
Eng. & Educator Osama
Ghandour
Now you can plug the usb cable
Eng. & Educator Osama
Ghandour
Run Arduino UNO with PyFirmata
library
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Communicate with standard Firmata
as downloading it to Arduino
Eng. & Educator Osama
Ghandour
Now you can un plug
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Arduino Temperature control
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Eng. & Educator Osama
Ghandour
Evidence of Learning &home work
• Start a task by
1- Create a project using logical
operators and conditional
statements. 2- Create a function
with parameters and call it.
• Complete the task as home work
Eng. & Educator Osama
Ghandour
Summary
1-Types of Loops.
2- while loop.
3- for loop
4-Loop control statement (start, end
and step).
5- Control all loops by break &
continue statements.
6- Infinite loop
Eng. & Educator Osama
Ghandour
Python
Prepare for next week
According to student’s law
Gn=Wn % Ng
CS.1.07 - 1- Gain knowledge
and understanding the
meaning of computer
language? 2- Draw conclusions
about conceptsEng. & Educator Osama
Ghandour
Python
Reflection
• Mention 2 things you learned today
• What is your goal to accomplish in
next week end in programming using
Python?
Eng. and Educator Osama
Ghandour
Python
Home work (s. proj.) 1
you studied in physics about
electric power and in your capstone about
saving wasted energy so design a flowchart
for Arduino control circuit to save the
consumed energy in electric power circuit .
Note : an ideal electric system has power
factor PF=0.999 and very low reactive
power. using loops and previous concepts
as logical operators and conditional
statements beside a function with
parameters , calling it to complete a
program / project. Eng. and Educator Osama Ghandour
Python
Rubaric
Blue
student differentiate between / using different types of
Loops with examples.
Green
student differentiate between / use using different
types of Loops .
Yello
w
student mention features / use one of type of loops .
Read student don`t have any idea loops .
Eng. and Educator Osama
Ghandour
Python
Resources
• https://www.youtube.com/watch?v=Rtww83GH
0BU
• https://www.w3schools.com/python/python_arra
ys.asp
• Other materials:
• https://www.sololearn.com
• https://www.w3schools.com
• www.python.org
Eng. and Educator Osama
Ghandour
Python
Textbook and Resource
Materials:
https://www.w3schools.com/python/pyth
on_dictionaries.asp
https://www.w3schools.com/python/pyth
on_functions.asp
.
Eng. & Educator Osama
Ghandour
Resources
• https://www.youtube.com/user/osmgg2
Other materials:
• https://www.sololearn.com
• https://www.w3schools.com
• www.python.org
• “Learning Python,” 2nd edition, Mark Lutz
and David Ascher (O'Reilly, Sebastopol, CA,
2004) (Thorough. Hard to get into as a quick
read)
Eng. & Educator Osama
Ghandour
Python
Learn and practice through on line web sites
https://www.thewebevolved.com
https://www.123test.com/
https://www.wscubetech.com/
https://www.w3schools.com/
https://www.guru99.com
https://codescracker.com/exam/review.php
https://www.arealme.com/left-right-brain/en/
https://www.proprofs.com/
https://www.geeksforgeeks.org/
https://www.tutorialspoint.com
https://www.sololearn.com
http://www.littlewebhut.com/
Eng. & Educator Osama
Ghandour
Python
If you do not feel happy, smile
and pretend to be happy.
• Smiling produces seratonin
which is a neurotransmitter
linked with feelings of
happiness
Thanks
Eng. & Educator Osama
Ghandour
Python
https://twitter.com/osamageris
https://www.linkedin.com/in/osamaghandour/
https://www.youtube.com/user/osmgg2
https://www.facebook.com/osama.g.geris
Eng. & Educator Osama
Ghandour
Python

More Related Content

Similar to Python week 7 8 2019-2020 for g10 by eng.osama ghandour

Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.ppt
Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.pptPython week 5 2019-2020 for G10 by Eng.Osama Ghandour.ppt
Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.pptOsama Ghandour Geris
 
Python week 2 2019 2020 for g10 by eng.osama ghandour
Python week 2 2019 2020 for g10 by eng.osama ghandourPython week 2 2019 2020 for g10 by eng.osama ghandour
Python week 2 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 
2019 session 6 develop programs to solve a variety of problems in math , phys...
2019 session 6 develop programs to solve a variety of problems in math , phys...2019 session 6 develop programs to solve a variety of problems in math , phys...
2019 session 6 develop programs to solve a variety of problems in math , phys...Osama Ghandour Geris
 
Approaches to teaching primary computing
Approaches to teaching primary computingApproaches to teaching primary computing
Approaches to teaching primary computingJEcomputing
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3aRuth Marvin
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-ProgrammersAhmad Alhour
 
MIT6_0001F16_Lec1.pdf
MIT6_0001F16_Lec1.pdfMIT6_0001F16_Lec1.pdf
MIT6_0001F16_Lec1.pdfssuser125b6b
 
Extreme Programming practices for your team
Extreme Programming practices for your teamExtreme Programming practices for your team
Extreme Programming practices for your teamPawel Lipinski
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsRuth Marvin
 
Writing for computer science: Fourteen steps to a clearly written technical p...
Writing for computer science: Fourteen steps to a clearly written technical p...Writing for computer science: Fourteen steps to a clearly written technical p...
Writing for computer science: Fourteen steps to a clearly written technical p...aftab alam
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithmJIMS LAJPAT NAGAR
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxmonicafrancis71118
 
programming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxprogramming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxaboma2hawi
 
Python Introduction Week-1 Term-3.pptx
Python Introduction Week-1 Term-3.pptxPython Introduction Week-1 Term-3.pptx
Python Introduction Week-1 Term-3.pptxMohammad300758
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic NotationsRishabh Soni
 

Similar to Python week 7 8 2019-2020 for g10 by eng.osama ghandour (20)

Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.ppt
Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.pptPython week 5 2019-2020 for G10 by Eng.Osama Ghandour.ppt
Python week 5 2019-2020 for G10 by Eng.Osama Ghandour.ppt
 
Python week 2 2019 2020 for g10 by eng.osama ghandour
Python week 2 2019 2020 for g10 by eng.osama ghandourPython week 2 2019 2020 for g10 by eng.osama ghandour
Python week 2 2019 2020 for g10 by eng.osama ghandour
 
2019 session 6 develop programs to solve a variety of problems in math , phys...
2019 session 6 develop programs to solve a variety of problems in math , phys...2019 session 6 develop programs to solve a variety of problems in math , phys...
2019 session 6 develop programs to solve a variety of problems in math , phys...
 
Approaches to teaching primary computing
Approaches to teaching primary computingApproaches to teaching primary computing
Approaches to teaching primary computing
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-Programmers
 
MIT6_0001F16_Lec1.pdf
MIT6_0001F16_Lec1.pdfMIT6_0001F16_Lec1.pdf
MIT6_0001F16_Lec1.pdf
 
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORYGE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
 
Extreme Programming practices for your team
Extreme Programming practices for your teamExtreme Programming practices for your team
Extreme Programming practices for your team
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
Writing for computer science: Fourteen steps to a clearly written technical p...
Writing for computer science: Fourteen steps to a clearly written technical p...Writing for computer science: Fourteen steps to a clearly written technical p...
Writing for computer science: Fourteen steps to a clearly written technical p...
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithm
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
UNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.pptUNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.ppt
 
programming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxprogramming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptx
 
Python Introduction Week-1 Term-3.pptx
Python Introduction Week-1 Term-3.pptxPython Introduction Week-1 Term-3.pptx
Python Introduction Week-1 Term-3.pptx
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Algorithms overview
Algorithms overviewAlgorithms overview
Algorithms overview
 
Python made easy
Python made easy Python made easy
Python made easy
 

More from Osama Ghandour Geris

functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...
functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...
functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...Osama Ghandour Geris
 
Mobile appliaction w android week 1 by osama
Mobile appliaction w android week 1 by osamaMobile appliaction w android week 1 by osama
Mobile appliaction w android week 1 by osamaOsama Ghandour Geris
 
Css week11 2020 2021 for g10 by eng.osama ghandour
Css week11 2020 2021 for g10 by eng.osama ghandourCss week11 2020 2021 for g10 by eng.osama ghandour
Css week11 2020 2021 for g10 by eng.osama ghandourOsama Ghandour Geris
 
How to print a sketch up drawing in 3d
How to print a sketch up drawing  in 3dHow to print a sketch up drawing  in 3d
How to print a sketch up drawing in 3dOsama Ghandour Geris
 
7 types of presentation styles on line
7 types of presentation styles on line7 types of presentation styles on line
7 types of presentation styles on lineOsama Ghandour Geris
 
Design pseudo codeweek 6 2019 -2020
Design pseudo codeweek 6 2019 -2020Design pseudo codeweek 6 2019 -2020
Design pseudo codeweek 6 2019 -2020Osama Ghandour Geris
 
2019 numbering systems decimal binary octal hexadecimal
2019 numbering systems decimal   binary octal hexadecimal2019 numbering systems decimal   binary octal hexadecimal
2019 numbering systems decimal binary octal hexadecimalOsama Ghandour Geris
 

More from Osama Ghandour Geris (20)

functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...
functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...
functions in python By Eng. Osama Ghandour الدوال فى البايثون مع مهندس اسامه ...
 
Mobile appliaction w android week 1 by osama
Mobile appliaction w android week 1 by osamaMobile appliaction w android week 1 by osama
Mobile appliaction w android week 1 by osama
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
 
Css week11 2020 2021 for g10 by eng.osama ghandour
Css week11 2020 2021 for g10 by eng.osama ghandourCss week11 2020 2021 for g10 by eng.osama ghandour
Css week11 2020 2021 for g10 by eng.osama ghandour
 
Cooding history
Cooding history Cooding history
Cooding history
 
Computer networks--network
Computer networks--networkComputer networks--network
Computer networks--network
 
How to print a sketch up drawing in 3d
How to print a sketch up drawing  in 3dHow to print a sketch up drawing  in 3d
How to print a sketch up drawing in 3d
 
Google sketch up-tutorial
Google sketch up-tutorialGoogle sketch up-tutorial
Google sketch up-tutorial
 
7 types of presentation styles on line
7 types of presentation styles on line7 types of presentation styles on line
7 types of presentation styles on line
 
Design pseudo codeweek 6 2019 -2020
Design pseudo codeweek 6 2019 -2020Design pseudo codeweek 6 2019 -2020
Design pseudo codeweek 6 2019 -2020
 
Php introduction
Php introductionPhp introduction
Php introduction
 
How to use common app
How to use common appHow to use common app
How to use common app
 
Creating databases using xampp w2
Creating databases using xampp w2Creating databases using xampp w2
Creating databases using xampp w2
 
warm up cool down
warm  up cool down warm  up cool down
warm up cool down
 
Flow charts week 5 2020 2021
Flow charts week 5 2020  2021Flow charts week 5 2020  2021
Flow charts week 5 2020 2021
 
Xamppinstallation edited
Xamppinstallation editedXamppinstallation edited
Xamppinstallation edited
 
Bloom s three pyramids
Bloom s three pyramidsBloom s three pyramids
Bloom s three pyramids
 
The learning experiences ladder
The learning experiences ladderThe learning experiences ladder
The learning experiences ladder
 
2019 numbering systems decimal binary octal hexadecimal
2019 numbering systems decimal   binary octal hexadecimal2019 numbering systems decimal   binary octal hexadecimal
2019 numbering systems decimal binary octal hexadecimal
 
Inquiry ibl project
Inquiry ibl projectInquiry ibl project
Inquiry ibl project
 

Recently uploaded

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Recently uploaded (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Python week 7 8 2019-2020 for g10 by eng.osama ghandour

  • 1. Agenda of LO CS.1.11 W7-8 1- Warm up Revision 10 min 2- ppt teacher demonstrate about Python 15m 3- Video about Python 5min 4- Practical work Students divided in pairs and use Anaconda : Spyder or on line Python platform to create very simple program using python -3.8.1 7 - Questions and answers as pretest about Python 5 m 8-Refelection 5 min 9- Home work 5 min Python Eng. & Educator Osama Ghandour
  • 2. LO CS.1.11 W7 : Understand and interpret concept the loop statements and give some examples. • Students can design programs involving loop statements. • Gain knowledge and understanding of function of the loops inside the program. • Students can compare between Lesson plan Python Eng. & Educator Osama Ghandour
  • 3. Warm Up Listen to this video Offline On line Python Eng. & Educator Osama Ghandour
  • 4. Warm up 5 min 1-Using logical operators and give some examples. 2- using & Comparing between if &switch statements and give some examples. 3- Write the general syntax of the conditional statements (if& switch). Eng. & Educator Osama Ghandour Python
  • 5. 5 if  If statement: Executes a group of statements only if a certain condition is true. Otherwise, the statements are skipped.  Syntax: if condition: statements  Example: gpa = 3.4 if gpa > 2.0: print "Your application is accepted." Eng. & Educator Osama Ghandour
  • 6. 6 if/else  if/else statement: Executes one block of statements if a certain condition is True, and a second block of statements if it is False.  Syntax: if condition: statements else: statements  Example: gpa = 1.4 if gpa > 2.0: print "Welcome to Mars University!" else: print "Your application is denied."  Multiple conditions can be chained with elif ("else if"): if condition: statements elif condition: statements else: statements Eng. & Educator Osama Ghandour
  • 7. 7 while  while loop: Executes a group of statements as long as a condition is True.  good for indefinite loops (repeat an unknown number of times)  Syntax: while condition: statements  Example: number = 1 while number < 200: print number, number = number * 2  Output: 1 2 4 8 16 32 64 128 Eng. & Educator Osama Ghandour
  • 8. 8 Relational VS Logic  Many logical expressions use relational operators:  Logical expressions can be combined with logical operators:  Exercise: Write code to display and count the factors of a number. Operator Example Result and 9 != 6 and 2 < 3 True or 2 == 3 or -1 < 5 True not not 7 > 0 False Operator Meaning Example Result == equals 1 + 1 == 2 True != does not equal 3.2 != 2.5 True < less than 10 < 5 False > greater than 10 > 5 True <= less than or equal to 126 <= 100 False >= greater than or equal to 5.0 >= 5.0 True Eng. & Educator Osama Ghandour
  • 10. Further programming • Lab exercises – Let's go downstairs to the basement computer labs! • - learn prcticaly • What next? – Lists , Dictionaries , Algorithms etc. Eng. & Educator Osama Ghandour
  • 11. Anaconda : Spyder or an on line Python platform Inputs : 1- though console 2- input message 3- sensors 2- Dataset Python – Cheat sheets You can install python-2.7.17 or python-3.8.1 Write Program / Code Eng. & Educator Osama Ghandour Python
  • 12. Anaconda > Use Spyder Eng. & Educator Osama Ghandour Python
  • 13. Coding window – Ipython console - Variable explorer Spyder Eng. & Educator Osama Ghandour Eng. & Educator Osama Ghandour
  • 15. Essential Questions • Essential Questions: 1- What is the function of the loop statement? 2- What is the general syntax of the loop statements? Eng. & Educator Osama Ghandour
  • 16. Essential Questions • Essential Questions: 3- Write a code to repeat a text "Egypt" 5 times. 4- Write a code to display the odd, even numbers from 0 to 10 and their sum. Eng. & Educator Osama Ghandour
  • 17. Essential Questions • Essential Questions: 5- Write a code to display the integer numbers between 1 to 100 divisible by 7 Eng. & Educator Osama Ghandour
  • 18. Types of loops in python . Listen to this video Offline On line Offline On line Eng. & Educator Osama Ghandour Python
  • 19. 19 while  while loop: Executes a group of statements as long as a condition is True.  good for indefinite loops (repeat an unknown number of times)  Syntax: while condition: statements  Example: number = 1 while number < 200: print number, number = number * 2  Output: 1 2 4 8 16 32 64 128 Eng. & Educator Osama Ghandour Iteration Loop structure
  • 21. Types of loops in python . Listen to this video Offline On line Offline On line Eng. & Educator Osama Ghandour Python
  • 22. For loop sume = 0 sumo = 0 for x in range (11): if x%2==0: print (x , "is even number") sume=sume+x else : print (x , "is odd number") sumo=sumo+x print (sume , "summestion of even numbers") print (sumo , "summestion of odd numbers") Eng. & Educator Osama Ghandour
  • 23. • 0 is even number • 1 is odd number • 2 is even number • 3 is odd number • 4 is even number • 5 is odd number • 6 is even number • 7 is odd number • 8 is even number • 9 is odd number • 10 is even number • 30 summestion of even numbers • 25 summestion of odd numbers Eng. & Educator Osama Ghandour
  • 24. Eng. & Educator Osama Ghandour
  • 25. Evidence of Learning: Create a project with a programming language “Python” using different types of Loops. Eng. & Educator Osama Ghandour
  • 26. Connection to math Eng. & Educator Osama Ghandour Create, interpret and analyze quadratic functions that model real-world situations. W1-4 Key Concepts: o 1. Quadratic Function o 2. First and second differences o 3. Completing the square o 4. Complex numbers o 5. Parabola o 6. Focus o 7. Argand diagram o 8. related roots
  • 27. Mechanics Eng. & Educator Osama Ghandour Learning Outcome: Use position, displacement, average and instantaneous velocity, average and instantaneous acceleration to describe 1-dimensional motion of an object. W1-3 Key Concepts: o 1. Position /Time graphs o 2. velocity/Time graphs o 3. Acceleration /Time graphs o 4. Relative velocity. o 5. Instantaneous velocity o 6. Average velocity o 7. Reference Frames
  • 28. Mechanics Eng. & Educator Osama Ghandour Week 04 - Week 08 Learning Outcome: Use kinematic equations to understand and predict 1-dimensional motion of objects under constant acceleration,including vertical (free-fall) motion under gravity. Key Concepts:  1. Area under a curve  2. Kinematic equations for 1-D motion with constant acceleration  3. Free-fall motion
  • 29. Physics • . Fluids w1-3 • 2. Pressure • 3. Manometer • 4. Pressure gauge • 5. Units of pressure • 6. Effect of atmospheric pressure on boiling point of water • 7. Change in atmospheric pressure with altitude • 8. Pressure difference and force • 9. Archimedes Principle Eng. & Educator Osama Ghandour
  • 30. Check your email to Solve the Online auto answered quiz 15 min after school the quiz will be closed in 10:00pm after tomorrowEng. & Educator Osama Ghandour Python
  • 31. Repetition (loops) in Python. Listen to this video Offline On line Offline On line Eng. & Educator Osama Ghandour Python
  • 32. Read /write to Arduino pins Eng. & Educator Osama Ghandour
  • 33. Now you can plug the usb cable Eng. & Educator Osama Ghandour
  • 34. Run Arduino UNO with PyFirmata library Eng. & Educator Osama Ghandour
  • 35. Eng. & Educator Osama Ghandour
  • 36. Eng. & Educator Osama Ghandour
  • 37. Communicate with standard Firmata as downloading it to Arduino Eng. & Educator Osama Ghandour
  • 38. Now you can un plug Eng. & Educator Osama Ghandour
  • 39. Eng. & Educator Osama Ghandour
  • 40. Eng. & Educator Osama Ghandour
  • 41. Eng. & Educator Osama Ghandour
  • 42. Eng. & Educator Osama Ghandour
  • 43. Arduino Temperature control Eng. & Educator Osama Ghandour
  • 44. Eng. & Educator Osama Ghandour
  • 45. Eng. & Educator Osama Ghandour
  • 46. Eng. & Educator Osama Ghandour
  • 47. Eng. & Educator Osama Ghandour
  • 48. Evidence of Learning &home work • Start a task by 1- Create a project using logical operators and conditional statements. 2- Create a function with parameters and call it. • Complete the task as home work Eng. & Educator Osama Ghandour
  • 49. Summary 1-Types of Loops. 2- while loop. 3- for loop 4-Loop control statement (start, end and step). 5- Control all loops by break & continue statements. 6- Infinite loop Eng. & Educator Osama Ghandour Python
  • 50. Prepare for next week According to student’s law Gn=Wn % Ng CS.1.07 - 1- Gain knowledge and understanding the meaning of computer language? 2- Draw conclusions about conceptsEng. & Educator Osama Ghandour Python
  • 51. Reflection • Mention 2 things you learned today • What is your goal to accomplish in next week end in programming using Python? Eng. and Educator Osama Ghandour Python
  • 52. Home work (s. proj.) 1 you studied in physics about electric power and in your capstone about saving wasted energy so design a flowchart for Arduino control circuit to save the consumed energy in electric power circuit . Note : an ideal electric system has power factor PF=0.999 and very low reactive power. using loops and previous concepts as logical operators and conditional statements beside a function with parameters , calling it to complete a program / project. Eng. and Educator Osama Ghandour Python
  • 53. Rubaric Blue student differentiate between / using different types of Loops with examples. Green student differentiate between / use using different types of Loops . Yello w student mention features / use one of type of loops . Read student don`t have any idea loops . Eng. and Educator Osama Ghandour Python
  • 54. Resources • https://www.youtube.com/watch?v=Rtww83GH 0BU • https://www.w3schools.com/python/python_arra ys.asp • Other materials: • https://www.sololearn.com • https://www.w3schools.com • www.python.org Eng. and Educator Osama Ghandour Python
  • 56. Resources • https://www.youtube.com/user/osmgg2 Other materials: • https://www.sololearn.com • https://www.w3schools.com • www.python.org • “Learning Python,” 2nd edition, Mark Lutz and David Ascher (O'Reilly, Sebastopol, CA, 2004) (Thorough. Hard to get into as a quick read) Eng. & Educator Osama Ghandour Python
  • 57. Learn and practice through on line web sites https://www.thewebevolved.com https://www.123test.com/ https://www.wscubetech.com/ https://www.w3schools.com/ https://www.guru99.com https://codescracker.com/exam/review.php https://www.arealme.com/left-right-brain/en/ https://www.proprofs.com/ https://www.geeksforgeeks.org/ https://www.tutorialspoint.com https://www.sololearn.com http://www.littlewebhut.com/ Eng. & Educator Osama Ghandour Python
  • 58. If you do not feel happy, smile and pretend to be happy. • Smiling produces seratonin which is a neurotransmitter linked with feelings of happiness
  • 59. Thanks Eng. & Educator Osama Ghandour Python