236,163 views
36 votes
36 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 Eman Fateen
by
2.7k points

1 Answer

25 votes
25 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 Ubershmekel
by
2.9k points