Lesson 1 - HL Vs Block and Variables 2
Lesson 1 - HL Vs Block and Variables 2
The Bigger Picture: In this lesson, we will take our first footsteps
into understanding computer programming.
We will look at how computers need precise
instructions to execute Python Programming.
In this lesson you will:
Task 1:
In your books:
Do instructions given to
computers instead of humans
need to be:
More
Moreprecise
As
precise
precise
Less precise
We Do: High Level vs Block Based
Block Based: Programming by drag and dropping blocks into the program
Advantages: Disadvantages:
• Easy to learn – ( good for
• Limited to how
starters)
• Can program basic games advanced the
• Not many errors to fix program is
• Slower to compute
WE DO: Variables and Assignment
in Python
Variable Identifier
Value
user = "Claude"
Assignment
print("Hello", user)
You Do: Extending the Program
https://www.online-python.com/
Hello Claude
My lucky number is 13
Make sure that your program displays the value of the lucky
1 user
variable, not =
just"Claude"
the number 13.
2 print("Hello", user)
3 lucky = 13
4 print( )
You Do: Make a program
1 username = “F4L4F3l“
2
3
4
You Do: Extending the Program
https://www.online-python.com/
print("What’s your name?") You will need the input function:
when your program must receive keyboard
print("Hello", user) When input is invoked, the program pauses, waiting for
keyboard input.