Bryce H.

asked • 02/19/23

how to code this?

In python:

Write a small program using a ‘while’ loop (while True).

  1. Prompt the user to enter their age.
  2. Using a string function, check if the input is a decimal value, if true then break from the loop.
  3. Continue prompting the user until a whole number (isdecimal) has been entered.


1 Expert Answer

By:

Jonathan S. answered • 02/20/23

Tutor
5 (3)

Experienced Math Educator and Former Google Software Engineer

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.