Write a python program to increment a number if it is positive.

                                  Write a python program to determine whether a person is eligible to vote.

Write a python program to increment a number if it is positive.


PROGRAM:

a=int(input("Enter a number:"))
if (a>0):
    a=a+1
    print("Number:",a)
else:
    print("Sorry! It's not a positive number.")

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.