Starting from:
$35

$29

Class Exercise 3 (Python3 Loops) Solution


Send your codes to the instructor via e-mail. Write Exercise3 to the subject of the email. Make a runnable single script file. (ayuksel@ccny.cuny.edu) Internet copy-paste answers will be scored zero.



    1. In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself). Write a Python3 program to check if a user-entered number is a perfect number or not. Use exception handling to handle invalid inputs.

    2. Write a Python3 program to find all positive integer divisors of a user-entered number. Use an interactive loop or a sentinel loop to terminate when finished.

    3. Write a Python3 program to check if 3 user-entered points on the coordinate plane creates a triangle or not. Use exception handling to handle invalid inputs and your program should terminate whenever the user wants to quit.

    4. Write a Python3 program to find all prime numbers between two given integer numbers. Your program should terminate whenever the user wants to quit.

    5. Given X different people, in how many different ways Y of them can be seated to a table. Your Pyhton3 program should terminate whenever the user wants to quit.

More products