Write a function that takes an integer, val, as an argument. The function asks the user to enter a number. If the number is greater than val, the function displays Too high. and returns 1; if the number is less than val, the function displays Too low. and returns –1; if the number equals val, the function displays Got it! and returns 0. Call the function repeatedly until the user enters the right number.

What will be an ideal response?


Computer Science & Information Technology

You might also like to view...

Data labels display the value represented by a data marker

Indicate whether the statement is true or false

Computer Science & Information Technology

Bulleted lists are also called ordered lists.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

To select a specific set of records to merge, you must ____.

A. edit B. filter C. sort D. print

Computer Science & Information Technology

The Detail section of a form appears once for every record. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology