Answer to Question #292502 in Python for vyst

Question #292502

 Integer Pairing

by CodeChum Admin

Now this one's a tad bit tricky, but you can definitely do it!


Instructions:

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Input

A line containing five integers separated by a space.

1·2·3·4·5

Output

A line containing an integer.

4084101
1
Expert's answer
2022-01-31T11:28:19-0500
numbers = [int(i) for i in input().split()]
s1_2 = numbers[0] + numbers[1]
s3_4 = numbers[2] + numbers[3]
res = (s1_2*s3_4)**numbers[4]
print(res)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS