SlideShare a Scribd company logo
1 of 42
Agenda of LO CS.1.09 W6
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.09 W5 :
Students can design
programs involving the
logical operators and
conditional statements.
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.
3- Write the general syntax of the
conditional statements (if).
Eng. & Educator Osama
Ghandour
Python
Essential Questions
• Essential Questions: learn
practically by designing a program
which include 1- the logical
operators and give some
examples. 2- Comparing between
if & switch statements and give
some examples. 3- Write the
general syntax of the conditional
statements (if & switch). Eng. & Educator Osama
Ghandour
Evidence of Learning:
Create a project with a
programming language
“Python” using Variables,
Constants Arithmetic, and
Assignment operators.
Eng. & Educator Osama
Ghandour
7
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
8
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
9
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
10
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
home work
Eng. & Educator Osama Ghandour
def week(i):
switcher={
0:'Sunday',
1:'Monday',
2:'Tuesday',
3:'Wednesday',
4:'Thursday',
5:'Friday',
6:'Saturday'
}
return switcher.get(i,"Invalid day of week") 11
Now, we make calls to week() with different values.
>>> week(2)
Output
‘Tuesday’
>>> week(0)
Output
‘Sunday’
>>> week(7)
Output
‘Invalid day of week’

12
13
Eng. & Educator Osama
Ghandour
14
Eng. & Educator Osama
Ghandour
Accepting studennts in STEM
 #a1=float(input("enter student degree in math"
 a=60 # math
 b=40 # English
 c=39 # Science
 s=95 # final result
 if (s>=98 and(a==60 or b==40 or c==40)) :
 print("accepted in STEM first")
 elif (s>=95 and(a==60 and b==40) or (c==40 and b==40 ) or
(a==60 and c==40)) :
 print("accepted in STEM second")
 else :
 print("not accepted in STEM")

15
functions
 Functions in Python
 Defining functions.
 Return values.
 Local variables.
 Built-in functions.
 Functions of functions.
 Passing lists, dictionaries, and
keywords to functions.
16
Eng. & Educator Osama
Ghandour
functions
17
Why functions?
• It may not be clear why it is worth the trouble to divide a
program into functions. • There are several reasons: •
Creating a new function gives you an opportunity to name a
group of statements, which makes your program easier to
read, understand, and debug. • Functions can make a
program smaller by eliminating repetitive code. Later, if you
make a change, you only have to make it in one place. •
Dividing a long program into functions allows you to debug
the parts one at a time and then assemble them into a
working whole. Well-designed functions are often useful for
many programs. Once you write and debug one, you can
reuse it
Eng. & Educator Osama
Ghandour
functions
 Define a Function: def
 Define them in the file above the point
they're used Body of the function
should be indented consistently (4
spaces is typical in Python) Example:
square.py def square(n): return n*n
 print "The square of 3 is ", print
square(3)
 Output: The square of 3 is 9
18
Eng. & Educator Osama
Ghandour
functions
 The def statement
 The def statement is executed (that's
why functions have to be defined
before they're used) def creates an
object and assigns a name to
reference it; the function could be
assigned another name, function
names can be stored in a list, etc.
Can put a def statement inside an if
statement, etc!
19
Eng. & Educator Osama
Ghandour
functions
20
Eng. & Educator Osama
Ghandour
functions
Functions, Procedures
def name(arg1, arg2, ...):
"""documentation"""#
optional doc string
statements
return # from procedure
return expression # from
function
21
Eng. & Educator Osama
Ghandour
functions
 More about functions
 • Arguments are optional. Multiple
arguments are separated by commas “ , ”.
• If there's no return statement, then
“None” is returned. Return values can be
simple types or tuples. Return values may
be ignored by the caller. • Functions are
“typeless.” Can call with arguments of any
type, so long as the operations in the
function can be applied to the arguments.
This is considered a good thing in Python
22
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
tomorrow
Eng. & Educator Osama
Ghandour
Python
Repetition (loops) in
Python.
Listen to this video
Offline On line
Offline On line
Eng. & Educator Osama
Ghandour
Python
Selection (if/else) in
Python
Listen to this video
Offline On line
Offline On line
Eng. & Educator Osama
Ghandour
Python
Evidence of Learning &home work
• Start a task by
1- Create a project using switch ,
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-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
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 logical operators and
conditional statements beside a function
with parameters , calling it to complete a
program .
Eng. and Educator Osama
Ghandour
Python
Rubaric
Blue
student differentiate between / use logical operators
and conditional statements with examples.
Green
student differentiate between / use logical operators
and conditional statements .
Yello
w
student mention features / use one of logical operators
or conditional statements .
Read
student don`t have any idea about logical operators and
conditional statements .
Eng. and Educator Osama
Ghandour
Python
Resources
• https://www.youtube.com/watch?v=Rtww83GH
0BU
• 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
Eng. & Educator Osama
Ghandour

More Related Content

What's hot

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
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in JavaMudit Gupta
 
An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timingPVS-Studio
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answerskavinilavuG
 

What's hot (7)

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
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in Java
 
An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timing
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Slides
SlidesSlides
Slides
 
report
reportreport
report
 

Similar to Python week 6 2019 2020 for grade 10

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
 
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
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytechyannick grenzinger
 
Module 1 - Programming Fundamentals.pptx
Module 1 - Programming Fundamentals.pptxModule 1 - Programming Fundamentals.pptx
Module 1 - Programming Fundamentals.pptxGaneshRaghu4
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-ProgrammersAhmad Alhour
 
Dive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdfDive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdfSudhanshiBakre1
 
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
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonRanjith kumar
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdflailoesakhan
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3aRuth 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
 
Python functional programming
Python functional programmingPython functional programming
Python functional programmingGeison Goes
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptxKarthickT28
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDeepikaV81
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptxNileshBorkar12
 
Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Ahmed Gad
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxRohitKumar639388
 

Similar to Python week 6 2019 2020 for grade 10 (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
 
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...
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
 
Module 1 - Programming Fundamentals.pptx
Module 1 - Programming Fundamentals.pptxModule 1 - Programming Fundamentals.pptx
Module 1 - Programming Fundamentals.pptx
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-Programmers
 
Dive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdfDive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdf
 
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
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
 
Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
 
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...
 
Python functional programming
Python functional programmingPython functional programming
Python functional programming
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptx
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptx
 
Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
 

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

Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort ServicesApsara Of India
 
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...srsj9000
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdfTanjirokamado769606
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Meanamikaraghav4
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Riya Pathan
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full NightCall Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceApsara Of India
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)bertfelixtorre
 
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...anamikaraghav4
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...anamikaraghav4
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Apsara Of India
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceTina Ji
 
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSHot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSApsara Of India
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...anamikaraghav4
 
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...Riya Pathan
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaRiya Pathan
 

Recently uploaded (20)

Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 ❣️💯 Available With Room 24×7
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services
5* Hotel Call Girls In Goa 7028418221 Call Girls In North Goa Escort Services
 
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
Hifi Laxmi Nagar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ D...
 
1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf1681275559_haunting-adeline and hunting.pdf
1681275559_haunting-adeline and hunting.pdf
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full NightCall Girls Nikol 7397865700 Ridhima Hire Me Full Night
Call Girls Nikol 7397865700 Ridhima Hire Me Full Night
 
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
 
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
Air-Hostess Call Girls Diamond Harbour : 8250192130 High Profile Model Escort...
 
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
Call Girls Service Bantala - Call 8250192130 Rs-3500 with A/C Room Cash on De...
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
 
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtSHot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
Hot Call Girls In Goa 7028418221 Call Girls In Vagator Beach EsCoRtS
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
 
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bagbazar 👉 8250192130 ❣️💯 Available With Room 24×7
 
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...
VIP Russian Call Girls Nanded Chhaya 8250192130 Independent Escort Service Na...
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
 

Python week 6 2019 2020 for grade 10

  • 1. Agenda of LO CS.1.09 W6 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.09 W5 : Students can design programs involving the logical operators and conditional statements. 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. 3- Write the general syntax of the conditional statements (if). Eng. & Educator Osama Ghandour Python
  • 5. Essential Questions • Essential Questions: learn practically by designing a program which include 1- the logical operators and give some examples. 2- Comparing between if & switch statements and give some examples. 3- Write the general syntax of the conditional statements (if & switch). Eng. & Educator Osama Ghandour
  • 6. Evidence of Learning: Create a project with a programming language “Python” using Variables, Constants Arithmetic, and Assignment operators. Eng. & Educator Osama Ghandour
  • 7. 7 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
  • 8. 8 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
  • 9. 9 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
  • 10. 10 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 home work Eng. & Educator Osama Ghandour
  • 12. Now, we make calls to week() with different values. >>> week(2) Output ‘Tuesday’ >>> week(0) Output ‘Sunday’ >>> week(7) Output ‘Invalid day of week’  12
  • 13. 13 Eng. & Educator Osama Ghandour
  • 14. 14 Eng. & Educator Osama Ghandour
  • 15. Accepting studennts in STEM  #a1=float(input("enter student degree in math"  a=60 # math  b=40 # English  c=39 # Science  s=95 # final result  if (s>=98 and(a==60 or b==40 or c==40)) :  print("accepted in STEM first")  elif (s>=95 and(a==60 and b==40) or (c==40 and b==40 ) or (a==60 and c==40)) :  print("accepted in STEM second")  else :  print("not accepted in STEM")  15
  • 16. functions  Functions in Python  Defining functions.  Return values.  Local variables.  Built-in functions.  Functions of functions.  Passing lists, dictionaries, and keywords to functions. 16 Eng. & Educator Osama Ghandour
  • 17. functions 17 Why functions? • It may not be clear why it is worth the trouble to divide a program into functions. • There are several reasons: • Creating a new function gives you an opportunity to name a group of statements, which makes your program easier to read, understand, and debug. • Functions can make a program smaller by eliminating repetitive code. Later, if you make a change, you only have to make it in one place. • Dividing a long program into functions allows you to debug the parts one at a time and then assemble them into a working whole. Well-designed functions are often useful for many programs. Once you write and debug one, you can reuse it Eng. & Educator Osama Ghandour
  • 18. functions  Define a Function: def  Define them in the file above the point they're used Body of the function should be indented consistently (4 spaces is typical in Python) Example: square.py def square(n): return n*n  print "The square of 3 is ", print square(3)  Output: The square of 3 is 9 18 Eng. & Educator Osama Ghandour
  • 19. functions  The def statement  The def statement is executed (that's why functions have to be defined before they're used) def creates an object and assigns a name to reference it; the function could be assigned another name, function names can be stored in a list, etc. Can put a def statement inside an if statement, etc! 19 Eng. & Educator Osama Ghandour
  • 21. functions Functions, Procedures def name(arg1, arg2, ...): """documentation"""# optional doc string statements return # from procedure return expression # from function 21 Eng. & Educator Osama Ghandour
  • 22. functions  More about functions  • Arguments are optional. Multiple arguments are separated by commas “ , ”. • If there's no return statement, then “None” is returned. Return values can be simple types or tuples. Return values may be ignored by the caller. • Functions are “typeless.” Can call with arguments of any type, so long as the operations in the function can be applied to the arguments. This is considered a good thing in Python 22 Eng. & Educator Osama Ghandour
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. Check your email to Solve the Online auto answered quiz 15 min after school the quiz will be closed in 10:00pm after tomorrow Eng. & Educator Osama Ghandour Python
  • 28. Repetition (loops) in Python. Listen to this video Offline On line Offline On line Eng. & Educator Osama Ghandour Python
  • 29. Selection (if/else) in Python Listen to this video Offline On line Offline On line Eng. & Educator Osama Ghandour Python
  • 30. Evidence of Learning &home work • Start a task by 1- Create a project using switch , logical operators and conditional statements. 2- Create a function with parameters and call it. • Complete the task as home work Eng. & Educator Osama Ghandour
  • 31. Summary 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
  • 32. 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
  • 33. 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 logical operators and conditional statements beside a function with parameters , calling it to complete a program . Eng. and Educator Osama Ghandour Python
  • 34. Rubaric Blue student differentiate between / use logical operators and conditional statements with examples. Green student differentiate between / use logical operators and conditional statements . Yello w student mention features / use one of logical operators or conditional statements . Read student don`t have any idea about logical operators and conditional statements . Eng. and Educator Osama Ghandour Python
  • 35. Resources • https://www.youtube.com/watch?v=Rtww83GH 0BU • Other materials: • https://www.sololearn.com • https://www.w3schools.com • www.python.org Eng. and Educator Osama Ghandour Python
  • 37. 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
  • 38. 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
  • 39. If you do not feel happy, smile and pretend to be happy. • Smiling produces seratonin which is a neurotransmitter linked with feelings of happiness
  • 40. Thanks Eng. & Educator Osama Ghandour Python
  • 42. Eng. & Educator Osama Ghandour