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

Einstein check confused by numbers in prompt #174

Open
curiouskiwi opened this issue Aug 10, 2023 · 2 comments
Open

Einstein check confused by numbers in prompt #174

curiouskiwi opened this issue Aug 10, 2023 · 2 comments
Assignees
Labels
CS50P CS50 Python

Comments

@curiouskiwi
Copy link
Contributor

If either prompt in the einstein.py code contains digits, check50 will erroneously use those in its comparison of correctness.

Example:

$ python einstein.py
Calculate e=mc^2, using mass: 1
E is: 90000000000000000

check50:

:) einstein.py exists
:( input of 1 yields output of 90000000000000000
    expected "90000000000000...", not "2,"
    Seems like your output might not be the right number!

Notice that it is picking up the following , in the prompt as well. not "2,"

@CarterZenke
Copy link
Member

@patrickthornton Do you think you'd have time to take a look at how we could improve this one?

@betapro
Copy link

betapro commented Aug 23, 2023

I had the same experience which appears to be caused by the caret (^) in the prompt. When I removed it and changed the prompt to "Enter an integer for mass in E = mc²:" and submitted again, there were no issues.

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

No branches or pull requests

4 participants