Flowcharts and Fundamentals - Activity
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:
- A program that takes in a number and outputs double that number.
- A program that takes in a number and halves it.
Challenge
- 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:
Program 2:
Challenge: