L1 Introduction To Programming
L1 Introduction To Programming
Programming
Learning objective
Assigning values: You assign a value to a variable using the assignment operator(=).
Variables
Assessment For Learning
Locate the fragment(s) of code
Line1:print("Best Subject Ever?")
that:
Line2:subject = “Computer Science” ● Display a message for the
Line3:print(subject, "is my favourite too!") user on the screen
● Assign a value to a variable.
● Identify a variable.
● Identify a value
Print() Function
Python print() function prints the message to the screen or any
other standard output.
Input() function
• The input () is a built-in function in python that allows the user to enter data which the program can use.
• The user must enter the input when the prompt message pops on the screen with the help of the keyboard.
• Once the input is given, this is evaluated, and the output is displayed.
Arithmetic operators in python
Activity 1- (Pair Programming)
Open Python Your program must ask at least three Write a python program that takes two variables and
environments and try: questions (name, age, and favorite assign random values to it.(Ex -Num1=20, Num2 = 10).
•Printing your name. hobby), then print a sentence Your program must find the total, difference, product and
•Print the year you summarizing the information: division of the two numbers and print the required result.
were born. For example, If two numbers are 20 and 10, the sum of
•Print your favorite Example: “[name] is [age] years old two numbers is 30, the difference of two numbers is 10,
color. and enjoys [hobby]”. the product of two numbers is 200, etc.
Level 1 -
Level 2 - Answer
Answer
Program Program
Output Output
Extension Task – Level 3 Answer
Program Output
Assessment For learning
Join Kahoot
• https://create.kahoot.it/share/p
ython-basics-print-input-variable
s-syntax/bd6ffed8-8d8c-445d-be
70-bb2fb51b811c
Plenary
A quick summary of the lesson
through
• https://wordwall.net/resource/22690224/python-quiz-concepts-revisi
ted
Reflect/Review your learning
Success Criteria Yes, I can I need help
I can use the print() function to
display a message on screen