Direction : Make a guessing game program that will generate a random number and ask the user to guess the generated value with at most three (3) attempts: Problem/Required : The system should have the corresponding feature/s: Generate a random value between 1 to 10. Give the user at most 3 attempts to input a value between 1 to 10. Display “Higher” or “Lower” depending on the user’s input compared to the generated value. Display “Sorry, 3 attempts already.” after 3 incorrect attempts, “Congratulations! You got it in n attempt/s” Show the generated number.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Direction : Make a guessing game program that will generate a random number and ask the user to guess the generated value with at most three (3) attempts:
Problem/Required : The system should have the corresponding feature/s:
- Generate a random value between 1 to 10.
- Give the user at most 3 attempts to input a value between 1 to 10.
- Display “Higher” or “Lower” depending on the user’s input compared to the generated value.
- Display “Sorry, 3 attempts already.” after 3 incorrect attempts, “Congratulations! You got it in n attempt/s”
- Show the generated number.
Step by step
Solved in 4 steps with 4 images