Given a list, add 1 if the given number in the list is even and add 2 if the given number is odd in a given string
input1 = int(input('Enter string here: ')) if input1 % 2 == 0: print(input1+1) else: print(input1+2) Enter string here: 7 9
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment