Question

An integer, n, is said to be perfect when the sum of all of the proper divisors of n is equal to n. Write a function that determines whether or not a positive integer is perfect. Your function will take one parameter. If that parameter is a perfect number then your function will return True. Otherwise, it will return False. In addition, write a main program that uses your function to identify and display all of the perfect numbers between 1 and 10,000.

Question

In this exercise, you will create a program that identifies all of the words in a string entered by the user. Begin by writing a function that takes a string as its only parameter. Your function should return a list of the words in the string with the punctuation marks at the edges of the words removed. The punctuation marks that you must consider include commas, periods, question marks, hyphens, apostrophes, exclamation points, colons, and semicolons. Do not remove punctuation marks that appear in the middle of a word, such as the apostrophes used to form a contraction.