CODING_INTERVIEW_PREPARATION Telegram 996
a = "10" → Variable a is assigned the string "10".

b = a → Variable b also holds the string "10" (but it's not used afterward).

a = a * 2 → Since a is a string, multiplying it by an integer results in string repetition.

"10" * 2 results in "1010"

print(a) → prints the new value of a, which is "1010".


Correct answer: D. 1010



tgoop.com/coding_interview_preparation/996
Create:
Last Update:

a = "10" → Variable a is assigned the string "10".

b = a → Variable b also holds the string "10" (but it's not used afterward).

a = a * 2 → Since a is a string, multiplying it by an integer results in string repetition.

"10" * 2 results in "1010"

print(a) → prints the new value of a, which is "1010".


Correct answer: D. 1010

BY Coding interview preparation




Share with your friend now:
tgoop.com/coding_interview_preparation/996

View MORE
Open in Telegram


Telegram News

Date: |

Telegram has announced a number of measures aiming to tackle the spread of disinformation through its platform in Brazil. These features are part of an agreement between the platform and the country's authorities ahead of the elections in October. Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group. 4How to customize a Telegram channel? During the meeting with TSE Minister Edson Fachin, Perekopsky also mentioned the TSE channel on the platform as one of the firm's key success stories. Launched as part of the company's commitments to tackle the spread of fake news in Brazil, the verified channel has attracted more than 184,000 members in less than a month. Healing through screaming therapy
from us


Telegram Coding interview preparation
FROM American