Answer:
#1
threedigit = int(input("Please enter a three-digit number: "))
if not(len(str(threedigit)) == 3):
print("The input should consist of three digits")
else:
print(str(threedigit * 7 * 11 * 13))
#2
fivedigit = int(input("Please enter a five-digit number: "))
if not(len(str(fivedigit)) == 5):
print("The input should consist of five digits")
else:
print(str(fivedigit * 11 * 9091))
Explanation:
Starting with the first program
#1
This line requests a three-digit input from the user
threedigit = int(input("Please enter a three-digit number: "))
The if condition below verifies that the input has exactly 3 digits
if not(len(str(threedigit)) == 3):
print("The input should consist of three digits")
else:
print(str(threedigit * 7 * 11 * 13)) -> This line runs when there are 3 digits
Proceeding to the second program
#2
This line requests a five-digit input from the user
fivedigit = int(input("Please enter a five-digit number: "))
The if condition below verifies that the input has exactly 5 digits
if not(len(str(fivedigit)) == 5):
print("The input should consist of five digits")
else:
print(str(fivedigit * 11 * 9091)) -> This line runs when there are 5 digits