164k views
1 vote
I need the answer to the below question *ASAP*

I need the answer to the below question *ASAP*-example-1

2 Answers

0 votes

Answer:

Does not exist.

Step-by-step explanation:

The answer is not in the option:

Let's analyse the code:

random.randint(2,4)

This means take in random integer numbers starting with 2 and ending with 4.

Meaning numbers : 2, 3 and 4

Next math.pow(a,2) means a× a = a2

So when we input 2 the function;

math.pow(a,2) returns an integer 4

You do same for input 3 , it returns 9.

For input 4 it returns 16.

And the result is encapsulated in the function string(). Meaning display the result as a string:

4 9 16

User JoGoFo
by
5.8k points
4 votes

2 4 9

Step-by-step explanation:

Basically what I thought was the way was, since 2 is first, then its 1, then since 4 is second, it's added second, lastly to get the last oneI added them all and got 9 so that's third.

User OblongMedulla
by
5.0k points