Topic: While
5. In a while loop, get numbers from the user until "end" is entered. Add the numbers together and display the sum.
See more
11. Write a while loop that adds the numbers 10-100 together. Increment your counter by 10. Display the resulting sum.
See more
21. You can determine where a year is a leap year if the year is divisible by 4. However, years that are also divisible by 100 are not leap years unless they are also divisible by 400, in which they are leap years. Write the psuedocode to determine for a year entered to be a standard year or a leap year. You should be able to repeat the entering of years as long as 0000 is not entered.
See more
40. Create a while loop that generates 100 random numbers. Only run the loop 50 times.
See more
42. Create a 0 player rock paper scissors game. Why 0 players? Make the computer play against itself. Run the process 3 times.
See more
22. Collect 10 temperatures in an array. Then determine in output if the temps are hot (<90), warm (68-89), cool (67-40), or cold (<39). As part of the output, show the Celsius value as part of the output.
Celsius formula to convert from Fahrenheit:
C = (F - 32) * (5/9)
See more
47. Create a program that accepts information from the user about bugs in the system.
Think of the system as a generic software program and this is an overly simple process to report bugs.
See more
48. Create a system where 2 bots battle each other using 0-6 for the attack. take turns and make sure you record the attacks and change the HP.
See more