Lab 1
Lab 1
Computer programming
1
lab1
week2
Recalling information on first lecture
Computational Thinking
Put the number of correct definition in the box next to the keyword.
Decision 6. Has one input, and two outputs: yes or no / true or false.
Let's Have fun
What is flow chart
2. Identify the tasks in chronological order. This might involve talking to participants, observing a process
and/or reviewing any existing documentation. You might write out the steps in note form, or begin a
rough chart.
3. Organize them by type and corresponding shape, such as process, decision, data, inputs or outputs.
4. Draw your chart, either sketching by hand or using a program such as Lucidchart / drow.io.
5. Confirm your flowchart, walking through the steps with people who participate in the process. Observe
the process to make sure you haven’t missed anything important to your purpose.
Draw a flowchart to read the two sides of a
rectangle and calculate its area.
Step1: start
Step2: read width and length of rectangle
Step3: calculate area
Step4:print area
Step5: end
sequence
Draw a flowchart to read a number and identify
either the number is positive or negative.
Step1: start
Step2: Declare a variable N
Step3: if N < 0 then print("Negative number")
Step5: else print("Positive number")
Step6: end
selection
Draw a flowchart to read two values,
determines the largest value and prints the
largest value with an identifying message.
a) Declare two variables
b) Check if VALUE1 is larger than VALUE2
c) if VALUE1 > VALUE2 then
print("The largest value is " + VALUE1)
e) End if
Print
“The largest value is ” +
MAX
Draw a flowchart to add even numbers
from 0 to 20
iteration
Count
%2==0
Thank you