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

Part1/4, exercise "Times five" will not accept float as an answer #46

Open
M95D opened this issue Jun 11, 2024 · 0 comments
Open

Part1/4, exercise "Times five" will not accept float as an answer #46

M95D opened this issue Jun 11, 2024 · 0 comments

Comments

@M95D
Copy link

M95D commented Jun 11, 2024

https://programming-24.mooc.fi/part-1/4-arithmetic-operations , exercise "Times five"
This program will fail the test:

number=input("Please type in a number: ")
print(f"{number} times 5 is {5*float(number)}")
  • The exercise did not instruct that the input can't be float or to only output int result.
  • Cast to float was already given as an example just above the exercise.
  • The course did not say that multiplication will output numbers with a .0 if the result is a float without a decimal part.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant