168k views
2 votes
Ask the user to input an integer. Print out the three numbers before it.

Sample Run-
Enter an integer: 4
3
2
1

User Oyse
by
3.1k points

1 Answer

3 votes

Answer:

f=float(input("Enter an integer: "))

c=(f-1)

a=(c-1)

b=(a-1)

print(str(c))

print(str(a))

print(str(b))

Step-by-step explanation:

This will print everything correctly, just copy and paste!

Questions about Python or more ProjectStem help? Just Send me a message!

User Dan Borza
by
3.6k points