numbers = [int(input()) for i in range(3)]
for n in numbers:
if n%2 == 0:
print(n**2, end=" ")
else:
print(n**3, end=" ")
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
numbers = [int(input()) for i in range(3)]
for n in numbers:
if n%2 == 0:
print(n**2, end=" ")
else:
print(n**3, end=" ")