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”)
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:
Understand how to use nested if statements in your programming
1.Use nested if, elif, else function 2.Correctly identify the flow of data through a program
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....
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?
New Learning Download and investigate the program called ‘nested selection statements’ from 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
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
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
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
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
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
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....