Skip to main content

Exercises 13.8 Exercises

Write a function named readposint that uses the input dialog to prompt the user for a positive integer and then checks the input to confirm that it meets the requirements. It should be able to handle inputs that cannot be converted to int, as well as negative int, and edge cases (e.g. when the user closes the dialog, or does not enter anything at all.)

You have attempted of activities on this page.