You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug at 33 page of code-basics python 3 course, there is a lesson about explicit type conversion, and there is a task:
Print the string '2 times' obtained from the number 2.9 (stored in the value variable) and the string times using type conversions and concatenation. To do this, you need to perform two conversions: first to an integer, and then to a string.
so, here is my solution that site confirmed:
But! I tested this code in my Python 3.10 IDLE and he said i had a mistake named like: SyntaxError: multiple statements found while compiling a single statement.
Is it okey?
The text was updated successfully, but these errors were encountered:
I found a bug at 33 page of code-basics python 3 course, there is a lesson about explicit type conversion, and there is a task:
Print the string '2 times' obtained from the number 2.9 (stored in the value variable) and the string times using type conversions and concatenation. To do this, you need to perform two conversions: first to an integer, and then to a string.
so, here is my solution that site confirmed:
value = 2.9
converted_value = int(value)
converted_value2 = str(converted_value)
print(converted_value2 + ' times')
But! I tested this code in my Python 3.10 IDLE and he said i had a mistake named like: SyntaxError: multiple statements found while compiling a single statement.
Is it okey?
The text was updated successfully, but these errors were encountered: