N/A
1.
Create a program for converting either a Celsius value to Fahrenheit, or a Fahrenheit value to Celsius.
Use a Selection symbol to ask the user what they want to convert, and then ask for the value and do the conversion. Formulas: C = (F-32)/1.8, and F = C*1.8 + 32
Note: Do not use a loop here
TEST CASES: 32 F = 0 C, and 212 F = 100 C
————————————————————————————————-
2.
Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, inside a loop, the user guesses a number and the game will report whether the guess is too low or too high. If the guess is correct the game will report that the user won.
To generate a random integer from 1 to n, use floor((random * n) + 1)For example, to generate a random number from 1 to 6, use the following code: floor((random * 6) + 1)
Part 2
Add a new variable for the number of tries, and when the user wins report how many tries it took them.
3.
Create separate flowcharts to do the following (using loops)

Part 1
Output wakeup! to the console 5 times
Save your flowchart as a raptor file

Part 2
Output the numbers 7 through 11. Then in a separate loop output 77 down to 72.
Save your flowchart as a raptor file

Part 3
Be creative and show an example of an indefinite loop.

(For example, define a Sentinel value, and repeatedly ask the user for input.)

Leave a Reply

Your email address will not be published. Required fields are marked *

N/A
1.
Create a program for converting either a Celsius value to Fahrenheit, or a Fahrenheit value to Celsius.
Use a Selection symbol to ask the user what they want to convert, and then ask for the value and do the conversion. Formulas: C = (F-32)/1.8, and F = C*1.8 + 32
Note: Do not use a loop here
TEST CASES: 32 F = 0 C, and 212 F = 100 C
————————————————————————————————-
2.
Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, inside a loop, the user guesses a number and the game will report whether the guess is too low or too high. If the guess is correct the game will report that the user won.
To generate a random integer from 1 to n, use floor((random * n) + 1)For example, to generate a random number from 1 to 6, use the following code: floor((random * 6) + 1)
Part 2
Add a new variable for the number of tries, and when the user wins report how many tries it took them.
3.
Create separate flowcharts to do the following (using loops)

Part 1
Output wakeup! to the console 5 times
Save your flowchart as a raptor file

Part 2
Output the numbers 7 through 11. Then in a separate loop output 77 down to 72.
Save your flowchart as a raptor file

Part 3
Be creative and show an example of an indefinite loop.

(For example, define a Sentinel value, and repeatedly ask the user for input.)

Leave a Reply

Your email address will not be published. Required fields are marked *