Question: please help I'm trying to come up with a python code to execute this code. This is what I have so far: def tf_quiz(question,answer): user

 please help I'm trying to come up with a python code

please help I'm trying to come up with a python code to execute this code. This is what I have so far:

def tf_quiz(question,answer): user = input(question, ":") if user == "T": c = "correct" else: c = "incorrect" return c

quiz_eval = tf_quiz("there is 12 monhts in a year","T") print("your answer is: ", quiz_eval)

Define and use tf_quiz() function tf_quiz() has 2 parameters which are both string arguments question : a string containg a T/F question like "Should save your notebook after edit? (T/F): " correct ans : a string indicating the correct answer, either "T" or "F" tf_quiz() returns a string: "correct" or "incorrect" Test tf_quiz(): create a T/F question (or several!) to call tf_quiz()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!