Computer Science, asked by suryakjr1386, 8 months ago

Write a program that inputs and integer in range 0-999 and then prints if the integer entered is a 1/2/3 digital number

Answers

Answered by prakethdutt1048
2

Answer:

Do I have to use Python3?

If yes, here is the code:

a=int(input("Enter a number: "))

if len(a)=1:

print(a)

elif len(a)=2:

print(a)

elif len(a)=3:

print(a)

You could put a else statement after this if you don't want an error:

else:

print("Not a 1, 2 or 3 digit number")

Read more on Brainly.in - https://brainly.in/question/16533422#readmore

Explanation:

Similar questions