check50

cs50/problems/2020/x/sentimental/mario/more


:) mario.py exists.

Log
checking that mario.py exists...

:) rejects a height of -1

Log
running python3 mario.py...
sending input -1...
checking that input was rejected...

:) rejects a height of 0

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

:) handles a height of 1 correctly

Log
running python3 mario.py...
sending input 1...

:( handles a height of 2 correctly

Cause
expected "" #  #"\n"##  ...", not "" #  # "\n"## ..."
Did you add too much trailing whitespace to the end of your pyramid?

Log
running python3 mario.py...
sending input 2...

Expected Output:
 #  #
##  ##
Actual Output:
 #  # 
##  ##

:( handles a height of 8 correctly

Cause
expected ""       #  #"\...", not ""       #  #  ..."
Did you add too much trailing whitespace to the end of your pyramid?

Log
running python3 mario.py...
sending input 8...

Expected Output:
       #  #
      ##  ##
     ###  ###
    ####  ####
   #####  #####
  ######  ######
 #######  #######
########  ########
Actual Output:
       #  #       
      ##  ##      
     ###  ###     
    ####  ####    
   #####  #####   
  ######  ######  
 #######  ####### 
########  ########

:( rejects a height of 9, and then accepts a height of 2

Cause
expected " #  #\n##  ##\...", not " #  # \n##  ##..."

Log
running python3 mario.py...
sending input 9...
checking that input was rejected...
sending input 2...
checking for output " # #\n## ##\n"...

Expected Output:
 #  #
##  ##
Actual Output:
 #  # 
##  ##

:) rejects a non-numeric height of "foo"

Log
running python3 mario.py...
sending input foo...
checking that input was rejected...

:) rejects a non-numeric height of ""

Log
running python3 mario.py...
sending input ...
checking that input was rejected...