Question: Problem 1 : ( 1 0 points ) Prompt the user for a number n . Find the number of digits in the number. Do

Problem 1: (10 points)
Prompt the user for a number n. Find the number of digits in the number. Do NOT
use string length.
Problem 2: (10 points)
Create a guessing game. Pick any number between 1 and 1000. Prompt the user
to guess numbers until the player guesses the correct number. For every guess,
output "Too high" or "Too low", and then ask for another input. At the end of the game,
the number is revealed along with the number of guesses it took to get the correct
number.
Problem 3: (10 points)
Prompt the user for a number n. Check if the number is an Armstrong number i.e.
sum of the cube of individual digits returns the same number. For example, 153 is
an Armstrong number since 13+53+33=153.371 is another example.
Problem 4: (10 points)
Prompt the user for a number n. Check if the number is a binary number or not i.e.
all digits in the number must be either 0 or 1. For example, 101 is a binary number
whereas 123 is not. Note: 0 and 1 are the only single digit binary numbers.
Problem 5:(10 points)
Prompt the user for a number n. Check if the number is composite i.e., the number
is NOT prime and hence it is divisible a number other than 1 and itself. For
example, 1,3,5,7 is prime whereas 4,6,8,9 are composite.
 Problem 1: (10 points) Prompt the user for a number n.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!