Download presentation
Presentation is loading. Please wait.
Published byLanny Sanjaya Modified over 6 years ago
1
For -G7 programing language Teacher / Shamsa Hassan Alhassouni
2
What we will Learn today?
Understand Random concept Understand for Loops Understand Nested Loops
3
Random
4
Random Function Description Input() Print ()
Built in Function not require any import. Randint() Should be imported / loaded in the program using command import
5
Guess the number
6
Types of Loops/ Iteration
Loop Type Description while loop Repeats a statement or a group of statements while a given condition is TRUE. It tests the condition before executing the loop body. for loop Executes a sequence of statements with a defined number of times and abbreviates the code that manages the loop variable. nested loops You can use one or more loops inside any another loop
7
For Loop
8
For Loop Let’s say that you want to print hello five times. How you will do it using python print function The above was will take time and to make repeating process much easier we will use for loop Variable Name
9
For Loop-Time Table Activity
10
Nested Loop
11
Loop in Loop / Nested Loops
12
Loop in Loop / Nested Loops
13
Code challenge Rock, Paper Scissors
15
How easy did find the today’s lesson in python?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.