182k views
4 votes
Try to answer the following question without running the code in Python: If we run the following line: y = int(3 * '4') what is the value of $y$?

User Escalator
by
4.1k points

1 Answer

5 votes

Answer:

444.

Explanation:

The '4' is considered to be a string so if you print y you would get 444. The int means 'integral, ( I believe).

User Rob McCready
by
4.2k points