Flowcharts and Fundamentals - Activity

Flowcharts and Fundamentals

Make sure you attempt the activity on your own before checking out the solution.

Instructions Part 1:

Using a pencil and paper or a flowcharting software like draw.io, design the following programs:

  1. A program that takes in a number and outputs double that number.
  2. A program that takes in a number and halves it.

Challenge

  1. A program that takes in a number, multiplies it by itself, subtracts 4, and outputs the result.

Instructions Part 2:

Have you ever logged into a website and the landing page greets you by name? Let's look at designing that functionality.

Using a pencil and paper or a flowcharting software, design the following program:

  • A program that takes in a user's name as input and displays the string 'Welcome [username]'.

For example, if the user input 'Luciana', the program would display 'Welcome Luciana'.

Solution

Part 1


Program 1:
Double the Number
Program 2:
Divide the Number
Challenge:

Part 2