CSC 171 - Introduction to Computer Programming

Lab Assignment #2 - Simple Flowcharts and Expressions

Due Wednesday, August 31, 2022

A flowchart is a way of showing the logic of a program (or algorithm) graphically, in two dimensions. The only things in a flowchart that we are concerned with at this time are four symbols:

If I want to read a value, find its square and print the square, my flowchart would be:

Your assignment in the lab is:

  1. Write a flowchart for the program in Lab #1:
    sum = 2 + 4 + 6
    average = sum / 3
    print("The average is ", average)
    
  2. Also rewrite the following into Python assignment statements:
    1. E = mc2
    2. X = ½ (a +b × c)
    3. G = xy/r2

[Back to the Lab Assignment List]