Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found a bug #247

Closed
TAMADA611 opened this issue Aug 14, 2022 · 1 comment
Closed

Found a bug #247

TAMADA611 opened this issue Aug 14, 2022 · 1 comment

Comments

@TAMADA611
Copy link

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?

@ssssank
Copy link
Contributor

ssssank commented Aug 16, 2022

Everything is ok with code. You need to run every statement with new line, don't copy and paste them together.

@ssssank ssssank closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants