+ 1
Python: Could you please help me regarding this?
Write a program that takes a number as input and - returns its double, if the number is even - returns its triple, if the number is odd - returns 0, if number is 0 Sample Input: 1 Sample Output: 3 My try number = input() number=x x+=1 if x%2==0: print (x*2) else: print (x*3)
5 odpowiedzi
+ 3
Of course! Link your attempt code here in this post so we can see where you're having problems
+ 1
number = input()
number=x
x+=1
if x%2==0:
print (x*2)
else:
print (x*3)
+ 1
No problem! And okay, as in..?
0
Thanks for this Slick , but SoloLearn goes some steps higher while giving code coach challange.