programming
DESCRIPTION
Programming. In. Lesson 6. R ecap. Discuss with the person next to you . . . what you have enjoyed about python programming What you have found difficult What question would you like to ask the teacher.. 2 mins and be ready to talk… . Objectives. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/1.jpg)
PROGRAMMINGIn
Lesson 6
![Page 2: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/2.jpg)
RECAP Discuss with the person next to you . . .
what you have enjoyed about python programming
What you have found difficult
What question would you like to ask the teacher..
2 mins and be ready to talk…
![Page 3: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/3.jpg)
OBJECTIVES Understand what a multi_selection statement Understand how to use a multi_selection statement
OUTCOMES All-Level 4 written if .. Elif .. Else code using while - with help
developed programs using pseudo codescored 50% in the plenary quiz
Most-Level 5 have written these with little help. scored 75% in the plenary quiz
Some-Level 6 Independently write these and adapt them and complete the extension tasks.
scored 90% in the plenary quiz
![Page 4: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/4.jpg)
PYTHON MULTI SELECTION If statement as you already know
Elif is new. It is executed if test_1 is false
Else statement as you already know
![Page 5: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/5.jpg)
SPECIFICATION I want a program to ask a student for their percentage
mark, and convert this to a grade.
The conversion will be done in a function called mark_grade
I want you to complete the function.
![Page 6: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/6.jpg)
Add you code in here – then test it against the grades above.
You can open this code from mark_to_grade start in lesson 6 folder.
![Page 7: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/7.jpg)
EXTENSION ACTIVITIES Ask the user for their target grade and print this with
their mark If their target grade > exam grade display a suitable
message If their target grade = exam grade display a suitable
message If their target grade < exam grade display a suitable
message
![Page 8: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/8.jpg)
With your classmate you have 2 mins to discuss…
What was most difficult in the program?
What was most fun?
What question would you like to ask the teacher?
Write these 3 answers in your self evaluation book.
CLASS DISCUSSION
![Page 9: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/9.jpg)
JOKE TIME You are to write a program that asks a user for their
favourite number and then tells them a joke. The program will call a joke printing function with the users favourite number.
The function will accept one numeric parameter and use it to choose the joke to tell. You will probably use multi_selection if statement to match the joke against the number.
![Page 10: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/10.jpg)
PSEUDO CODE
Print a joke using the users number
Start
End
Ask user their name
Ask then for their number
Call the joke telling function
Joke Telling function
End
Extension activities:Get jokes from the internetGive the user a range to choose fromGive the user an option to pick a random joke.
![Page 11: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/11.jpg)
PLENARY Complete the End of unit test
![Page 12: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/12.jpg)
Open the ICT levels spread sheet and find python tab Read each Yellow box and answer in the yellow box, as well
as the www and ebi.
HOUSEKEEPING
![Page 13: Programming](https://reader034.vdocuments.us/reader034/viewer/2022051700/56815fb1550346895dceacc9/html5/thumbnails/13.jpg)
PLENARY Spend a few minutes playing the hangman game.