Practical 1
Practical 1
Practical 1
Y8-Computing
Unit 9.1: Presenting choices: Combining Constructs
Consider a chatbot is asking you how many hours you have free, what your favorite activity
is and how long your activity will take, and then output as a sentence how much time you
2. Switch to script mode and make two variables with the name hours
Data Types:
using integer data type and an activity using string data type. String
Character
3. Make another variable with the name activity_Time using float data Integer
Real
type. Boolean
4. Subtract hours from activity time to find out the total time left for
your activity.
5. Print the command that will tell you when you have completed an activity and how much
Evidence 1: Take the screenshot of python shell & script mode both and paste it in your
evidence file.
7. Open a new file in python shell (Interactive mode) and put a comment
8. Open script mode and add two variables with name username and password using input
function.
if password==1234:
else:
10. Save the program as p1.py in your z-drive and ‘Run’ to execute the program in python shell.
Evidence 2: Take the screenshot of python shell & script mode both and paste it in your
evidence file.
11. Open draw.io software and make a flowchart of the above scenario.
Evidence 3: Take the screenshot of flowchart from draw.io and paste it in your evidence
file.
12. Save your Evidence file and print your document. Make sure to add header with name,
student Id and class.
--------------------------------------------