Lab # 2
Lab # 2
• Introduction
• Logic in Daily Life
• What is a programming language?
• What is Scratch?
• Building Blocks in Scratch
• Events
• Looks
• Sensing
• Variables
• Operations
Logic in Daily Life
• Code-less coding
• A block-based,
drag-and-drop
visual programming
language
• Take an input from the user and display the next number from it
Variables (Solutions)
Variables (Practice Questions)
• Take length of a side of a square as input from the user and display
the value after adding 5 to it.
• Imagine that you buy toffees everyday. You need to create a variable
to keep track of how many toffees you buy everyday.
Aside: Comments
and
and
or
or
not and
not
• Take length of a side of a square as input from the user and display
the value after adding 5 to it.
• Take two integers as input and check whether the first number is
greater than the second or the second number is greater than the
first.
Operations (Solutions)
Operations (Practice Questions)
• Take two integers from the user and figure out whether the first
integer is a multiple of second.
• Lab Manuals
• Assignments
• Mark sheet lab