.ipynb = python file

print("Hello World!") #simple hello world print command
Hello World!
msg = input("Enter a greeting: ") #input and output command
print(msg)
yo
print("Enter Something") #input and output command 2.0
s = input()
print("You wrote:",s)
enter something
You wrote: yo
def question_and_answer(prompt): #question and answer command
    print("Question: " + prompt)
    msg = input()
    print("Answer: " + msg)

question_and_answer("Do you like food?")
question_and_answer("Do you play a sport?")
question_and_answer("What's your favorite class?")
Question: Do you like food?
Answer: yes
Question: Do you play a sport?
Answer: yes, soccer
Question: What's your favorite class?
Answer: CSP!
import getpass, sys #

def question_with_response(prompt):
    print("Question: " + prompt)
    msg = input()
    return msg

questions = 3
correct = 0

print('Hello, ' + getpass.getuser() + " running " + sys.executable)
print("You will be asked " + str(questions) + " questions.")
question_with_response("Are you ready to take a test?")

rsp = question_with_response("What command is used to include other functions that were previously developed?")
if rsp == "import":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("What command is used to evaluate correct or incorrect response in this example?")
if rsp == "if":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

rsp = question_with_response("Each 'if' command contains an '_________' to determine a true or false condition?")
if rsp == "expression":
    print(rsp + " is correct!")
    correct += 1
else:
    print(rsp + " is incorrect!")

print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
Hello, dillonlee running /opt/homebrew/opt/python@3.10/bin/python3.10
You will be asked 3 questions.
Question: Are you ready to take a test?
Question: What command is used to include other functions that were previously developed?
import is correct!
Question: What command is used to evaluate correct or incorrect response in this example?
i dont know is incorrect!
Question: Each 'if' command contains an '_________' to determine a true or false condition?
expression is correct!
dillonlee you scored 2/3