check50

cs50/problems/2022/python/coke


:) coke.py exists

Log
checking that coke.py exists...

:( coke accepts 25 cents

Cause
Did not find "Amount Due: 25\n" in "Amount Due:  25\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 25...
checking for output "Amount Due: 25\n"...

Could not find the following in the output:
Amount Due: 25
Actual Output:
Amount Due:  25
Insert Coin :

:( coke accepts 10 cents

Cause
Did not find "Amount Due: 40\n" in "Amount Due:  40\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 10...
checking for output "Amount Due: 40\n"...

Could not find the following in the output:
Amount Due: 40
Actual Output:
Amount Due:  40
Insert Coin :

:( coke accepts 5 cents

Cause
Did not find "Amount Due: 45\n" in "Amount Due:  45\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 5...
checking for output "Amount Due: 45\n"...

Could not find the following in the output:
Amount Due: 45
Actual Output:
Amount Due:  45
Insert Coin :

:( coke rejects invalid amount of cents

Cause
Did not find "Amount Due: 50\n" in "Amount Due:  50\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 30...
checking for output "Amount Due: 50\n"...

Could not find the following in the output:
Amount Due: 50
Actual Output:
Amount Due:  50
Insert Coin :

:( coke accepts continued input

Cause
Did not find "Amount Due: 30\n" in "Amount Due:  30\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 10...
sending input 10...
checking for output "Amount Due: 30\n"...

Could not find the following in the output:
Amount Due: 30
Actual Output:
Amount Due:  30
Insert Coin :

:( coke terminates at 50 cents

Cause
expected: "...wed: 0\n"     actual:   "...wed:  0\n"

Log
running python3 coke.py...
sending input 10...
sending input 10...
sending input 10...
sending input 10...
sending input 10...
checking for output "Change Owed: 0\n"...

Expected Output:
"...wed: 0\n"
Actual Output:
"...wed:  0\n"

:( coke provides correct change

Cause
Did not find "Change Owed: 10\n" in "Change Owed:  10\r\nInsert Coin :"

Log
running python3 coke.py...
sending input 25...
sending input 10...
sending input 25...
checking for output "Change Owed: 10\n"...

Could not find the following in the output:
Change Owed: 10
Actual Output:
Change Owed:  10
Insert Coin :