Skip to content

issue238 fix #295

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

Merged
merged 1 commit into from
Jan 26, 2025
Merged

issue238 fix #295

merged 1 commit into from
Jan 26, 2025

Conversation

patrickthornton
Copy link
Contributor

allows check50 to catch wrong .randrange/.randint before it becomes pedagogically disastrous

allows check50 to catch wrong .randrange/.randint before it becomes
disastrous
@rongxin-liu
Copy link
Contributor

Fixes #238

@rongxin-liu rongxin-liu self-assigned this Jan 24, 2025
@rongxin-liu rongxin-liu added CS50P CS50 Python enhancement New feature or request labels Jan 24, 2025
@check50.check(test_valid_level)
def test_random():
"""Little Professor generates random numbers correctly"""
level = "1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible that some students might use random.randrange for levels 2 and 3 but not for level 1, and check50 would not be able to detect it. However, the likelihood of such a scenario is so low that it may not be worth the effort to check all levels.

@rongxin-liu rongxin-liu merged commit 238ac4d into cs50:2022/python Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CS50P CS50 Python enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants