do it now activity correct the 8 syntax errors: age = input(“how old are you?” if age = 10...
TRANSCRIPT
![Page 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/1.jpg)
KEYWORDS
Do it now activityCorrect the 8 syntax errors:
Age = input(“How old are you?”
If age = 10Print(You are 10”)
else:print(“You are not 10”)
![Page 2: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/2.jpg)
KEYWORDS
LEARNINGOBJECTIVES
Homework PseudocodeYou 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:
![Page 3: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/3.jpg)
EXAMPLE PSEUDOCODE
![Page 4: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/4.jpg)
Understand how to use nested if statements in your programming
AIM
![Page 5: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/5.jpg)
1. Use nested if, elif, else function
2. Correctly identify the flow of data through a program
LEARNING OBJECTIVES
![Page 6: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/6.jpg)
LEARNING OUTCOMES
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 ....
![Page 7: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/7.jpg)
KEYWORDS
LEARNINGOBJECTIVES
1. Use nested if, elif, else function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
New Learning
Can you identify who did the crime?
![Page 8: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/8.jpg)
KEYWORDS
LEARNINGOBJECTIVES
New LearningDownload and investigate the program called ‘nested selection statements’ from www.Y8computing.weebly.com Term 4 Lesson 5
1. Use nested if, elif, else function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 9: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/9.jpg)
KEYWORDS
LEARNINGOBJECTIVES
Independent taskCan 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 function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 10: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/10.jpg)
KEYWORDS
LEARNINGOBJECTIVES
Independent taskYou 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 function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 11: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/11.jpg)
KEYWORDS
Copy Keyword
LEARNINGOBJECTIVES
Nesting: When control structures are inserted within other control structures.
Copy Keyword
1. Use nested if, elif, else function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 12: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/12.jpg)
KEYWORDS
LEARNINGOBJECTIVES
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 function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 13: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/13.jpg)
KEYWORDS
Plenary
LEARNINGOBJECTIVES
Three stars and a wish.
1. Use nested if, elif, else function2. Correctly identify the flow of data through a program
NestedSelection statement
IfElseElif
ConditionBooleanNegation
![Page 14: 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”)](https://reader036.vdocuments.net/reader036/viewer/2022072009/56649d945503460f94a7c0bf/html5/thumbnails/14.jpg)
LEARNING OUTCOMES
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 ....