- 1
Write a python programme to enter a number and print it's square if it's even and cube if it's odd.
4 odpowiedzi
+ 4
Write a program that outputs your own homework.
+ 4
One line:
print((lambda x: x**3 if x % 2 else x ** 2)(int(input())))
+ 3
n=int(input())
if(n%2==0):
print(n**2)
else:
print(n**3)