Presentation is loading. Please wait.

Presentation is loading. Please wait.

Do it now activity Correct the 8 syntax errors: Age = input(“How old are you?” If age = 10 Print(You are 10”) else: print(“You are not 10”)

Similar presentations


Presentation on theme: "Do it now activity Correct the 8 syntax errors: Age = input(“How old are you?” If age = 10 Print(You are 10”) else: print(“You are not 10”)"— Presentation transcript:

1 Do it now activity Correct the 8 syntax errors: Age = input(“How old are you?” If age = 10 Print(You are 10”) else: print(“You are not 10”)

2 Homework Pseudocode You will be given a home learning sheet to complete for homework this term. Complete challenge 2 Your teacher will explain what you need to do. Due:

3

4 Understand how to use nested if statements in your programming

5 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program

6 ALL (Level 4) I know the difference between, and appropriately I can use if and if, then and else statements. MOST (Level 5) I can use a range of operators and expressions e.g. Boolean, and applies them in the context of program control. SOME (Level 6) I can use nested selection statements. By the end of this lesson you will be able to....

7 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation New Learning Can you identify who did the crime?

8 New Learning Download and investigate the program called ‘nested selection statements’ from  www.Y8computing.weebly.com  Term 4  Lesson 5 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

9 Independent task Can you adapt the code to: Check if the user has entered a correct username and password? Username = Dsmith Password = teapot Can you use negation for this? 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

10 Independent task You can use and to check if more than one statement is true ie if name == “Dave” and age == 12: Can you use this in your program? 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

11 Copy Keyword Nesting: When control structures are inserted within other control structures. Copy Keyword 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

12 1.Why did you need to create a nested selection statement for this task? 2.Why did you need to create an else statement that was outside of the nesting? Talk task 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

13 Plenary Three stars and a wish. 1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program Nested Selection statement If Else Elif Condition Boolean Negation

14 ALL (Level 4) Explain the difference between, and appropriately I can use if and if, then and else statements. MOST (Level 5) Use a range of operators and expressions e.g. Boolean, and applies them in the context of program control. SOME (Level 6) Use nested selection statements. I can....


Download ppt "Do it now activity Correct the 8 syntax errors: Age = input(“How old are you?” If age = 10 Print(You are 10”) else: print(“You are not 10”)"

Similar presentations


Ads by Google