ASSIGNMENT - 3 Increment the number
Increment the number
Write a program to increment
N
by 5, if N
is greater than 10, otherwise by 1.Input
The first line of input is an integer
N
.Output
Print the output obtained after performing operations as mentioned above.
Explanation
For example, if the value of
N
is 3
as it is less than 10, The N
value increments by 1. So the output is 4
.n=int(input())
if n<10:
print(n+1)
else:
print(n+5)
Comments
Post a Comment