check50

cs50/problems/2022/python/professor


:) professor.py exists

Log
checking that professor.py exists...

:) Little Professor rejects level of 0

Log
running python3 testing.py get_level...
sending input 0...
checking that input was rejected...

:) Little Professor rejects level of 4

Log
running python3 testing.py get_level...
sending input 4...
checking that input was rejected...

:) Little Professor rejects level of "one"

Log
running python3 testing.py get_level...
sending input one...
checking that input was rejected...

:) Little Professor accepts valid level

Log
running python3 testing.py get_level...
sending input 1...
checking that program exited with status 0...
running python3 testing.py get_level...
sending input 2...
checking that program exited with status 0...
running python3 testing.py get_level...
sending input 3...
checking that program exited with status 0...

:( Little Professor generates random numbers correctly

Cause
expected "[7, 8, 9, 7, 4...", not "[(7, 8), (9, 7..."

Log
running python3 testing.py rand_test...
sending input 1...
checking for output "[7, 8, 9, 7, 4, 6, 3, 1, 5, 9, 1, 0, 3, 5, 3, 6, 4, 0, 1, 5]"...

Expected Output:
[7, 8, 9, 7, 4, 6, 3, 1, 5, 9, 1, 0, 3, 5, 3, 6, 4, 0, 1, 5]
Actual Output:
[(7, 8), (9, 7), (4, 6), (3, 1), (5, 9), (1, 0), (3, 5), (3, 6), (4, 0), (1, 5), (7, 9), (4, 5), (2, 7), (1, 3), (5, 8), (2, 5), (5, 5), (7, 2), (8, 1), (9, 0)]

:) At Level 1, Little Professor generates addition problems using 0–9

Log
running python3 testing.py main...
sending input 1...
checking for output "6 + 6 ="...

:) At Level 2, Little Professor generates addition problems using 10–99

Log
running python3 testing.py main...
sending input 2...
checking for output "59 + 63 ="...

:) At Level 3, Little Professor generates addition problems using 100–999

Log
running python3 testing.py main...
sending input 3...
checking for output "964 + 494 ="...

:) Little Professor generates 10 problems before exiting

Log
running python3 testing.py main...
sending input 1...
sending input 12...
sending input 4...
sending input 15...
sending input 10...
sending input 12...
sending input 12...
sending input 10...
sending input 6...
sending input 10...
sending input 12...
checking that program exited with status 0...

:( Little Professor displays number of problems correct

Cause
expected "9", not "Level: 6 + 6 =..."

Log
running python3 testing.py main...
sending input 1...
sending input 12...
sending input 4...
sending input 15...
sending input 8...
sending input 8...
sending input 8...
sending input 12...
sending input 12...
sending input 10...
sending input 6...
sending input 10...
sending input 12...
checking for output "9"...

Expected Output:
9
Actual Output:
Level: 6 + 6 = 0 + 4 = 8 + 7 = 6 + 4 = EEE
6 + 4 = EEE
6 + 4 = EEE
6 + 4 = 10
7 + 5 = 9 + 3 = 8 + 2 = 4 + 2 = 1 + 9 = 4 + 8 = Score: 9/10

:( Little Professor displays number of problems correct in more complicated case

Cause
expected "8", not "Level: 6 + 6 =..."

Log
running python3 testing.py main...
sending input 1...
sending input 12...
sending input 4...
sending input 15...
sending input 8...
sending input 8...
sending input 8...
sending input 12...
sending input 13...
sending input 12...
sending input 10...
sending input 6...
sending input 10...
sending input 3...
sending input 2...
sending input 1...
checking for output "8"...

Expected Output:
8
Actual Output:
Level: 6 + 6 = 0 + 4 = 8 + 7 = 6 + 4 = EEE
6 + 4 = EEE
6 + 4 = EEE
6 + 4 = 10
7 + 5 = 9 + 3 = EEE
9 + 3 = 8 + 2 = 4 + 2 = 1 + 9 = 4 + 8 = EEE
4 + 8 = EEE
4 + 8 = EEE
4 + 8 = 12
Score: 8/10

:) Little Professor displays EEE when answer is incorrect

Log
running python3 testing.py main...
sending input 1...
sending input 0...
checking for output "EEE"...

:) Little Professor shows solution after 3 incorrect attempts

Log
running python3 testing.py main...
sending input 1...
sending input 0...
sending input 0...
sending input 0...
checking for output "12"...