Bart H.

asked • 02/01/21

Computer Science Python- Beginner

  1. Ask for the number of hours used as a decimal fraction (a floating-point number). Validate the number and if it is invalid, keep asking the user for a valid number. If it is valid, round the number of hours up to the next integer value. Even though if it is a whole number, it can remain stored in a float.

While loop

user input

Enter you number of hours:

your usage charge is for (rounded) hours.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.