cognitive-engineering-lab / mdbook-quiz

Interactive quizzes for Markdown
http://cel.cs.brown.edu/mdbook-quiz/
Apache License 2.0
106 stars 23 forks source link

Pb display tracing quiz #7

Open mlelarge opened 2 years ago

mlelarge commented 2 years ago

Hi, here is my pb (screenshot from https://dataflowr.github.io/quiz/python.html): Screenshot from 2022-09-15 09-13-38

I noticed that in your example (live-demo), the rendering is fine: Screenshot from 2022-09-15 09-17-24

So there is something I am doing wrong but I do not know what?

code (taken from https://github.com/dataflowr/quiz/blob/main/dl-quiz/src/quiz_01.toml):

[[questions]]
type = "Tracing"
prompt.program = """
def print_11():
    x = 11            
    print(x)          
def print_x_outside():
    print(x)          
x = 10                
def main():
    def print_x_inside():
        print(x)      
    x = 11            
    print_11()        
    print_x_inside()  
    x = 12            
    print_x_outside() 
    print_11()        
    print_x_inside()  
main()
"""
answer.doesCompile = true
answer.stdout = """
11
11
10
11
12"""

Thank you for your help.

willcrichton commented 2 years ago

I think this is a CSS bug in mdbook-quiz. I will take a look into it.