Computer Science, asked by nooh10773, 1 day ago

In python what will be its output
tuple1 = (2,4,3)
tuple3 = 1*2
print(tuple3)​

Answers

Answered by anindyaadhikari13
1

\texttt{\textsf{\large{\underline{Correct Co{}de}:}}}

tuple1=(2,4,3)

tuple3=tuple1*2

print(tuple3)

\texttt{\textsf{\large{\underline{Outp{u}t}:}}}

> (2, 4, 3, 2, 4, 3)

\texttt{\textsf{\large{\underline{Explanation}:}}}

In this co‎de,

> tuple1 = (2,4, 3)

Now, tuple1 is multiplied with 2 and it is stored in tuple3.

Whenever a tuple with any number n, it gets repeated n times.

Here, tuple1 is multiplied with 2. So it repeats 2 times.

Hence,

> tuple3 = (2, 4, 3, 2, 4, 3)

Which is displayed on the screen.

Similar questions