A couple important notes/requirements: · Name your file Assignment1.py · Make sure you include the proper white space.Each programming statement should be on its own line. · Include a docstring...


A couple important notes/requirements:



·

Name your file Assignment1.py



·
Make sure you include the proper white space.Each programming statement should be on its own line.



·
Include a docstring “header” comment block at the top of the file with the name of the file, an ample description of the assignment, your name and date created/modified.



·
Include a decent amount of comments inside the file for calculations and other notable code.You should have at least 5goodsingle line comments in the file in addition to the “header” comment block at the top of the program.



·
You should have at least 7 different variables.Make sure they have meaningful names



·
You may work together on the assignment or ask for assistance.You are NOT allowed to copy someone else’s work or have someone do the assignment for you.



·
DO NOT:



o
Do not use anything not covered in the first two chapters in the book.So, for example, do not create your own functions or classes



o
Do not use loops in this assignment.Only variables and if statements are needed.



o
Do not create a program that uses a subject material you think I might find objectionable. For example, don’t create a quiz on the effects of Molly, OG, ICE or other drugs





Assignment #1 Specifics- Write a quiz program that will:


1.Welcome the user to your quiz program


2.Prompt the user for their name and then collect that name and store it in an appropriately named variable.


3.Thank the userby name(the name they supplied) and tell them to get ready to take the quiz


4.Provide the user with 5 separate quiz questions that are all related to the same subject.For example, you could create a quiz that asks 5 trivia questions about a movie you enjoy.


a.Each question will have a question and between 3 and 4 possible answers. Each possible answer will appear on a different line


b.It is up to you what the subject is and what the correct answers are.


c.I will let you determine what kind of value you are validating from the user.I suggest using a letter or a number so the user doesn’t need to type in a long string of text to answer the question


d.Each answer will need to be considered for correctness.At the end of the program you will need to determine how many correct answers there were.So I recommend a running counter (which keeps track of how many correct answers there are)



i.If you are using text for the user answers, your program should handle both uppercase and lowercase variants.So a “B” or “b” would both be valid choices for the 2ndanswer.


e.To display each question- You may use multiple print statements followed by a single input function statement to collect the data OR you may use a single input function statement that utilizes many escape sequences.


5.After you have collected the 5 answers from the user, output the number of questions they got correct out of 5.For example, they could have scored a 2 out of 5.The number should be based on the value stored in the variable.


6.On the next line, output 1 of 6 possible statements in regard to the score.Utilize a single if statementwith multiple elif statements to handle the different output scenarios.For example, if they scored 0 out of 5, you may want to put a pity statement in there like, “Well, that wasn’t good”.If they score a 4 out of 5, you may want to congratulate them on almost getting every question correct, etc.Use your creativity with the statements you come up with, but please keep the comments PG rated.No crass humor please.


7.After step 6, for every question the user got wrong, I want you to tell them what Question(s) they got wrong, what they answered (which should still be in a variable), and what the correct answer was.Then I want you to give a “fun little fact” about the correct answer.See my attached example to see what I am looking for.


a.Do not use loops to complete this


b.Each of the 5 questions should be checked for this step and they should each have their own fun facts


c.If the user got all the questions correct, then the program should skip these “question corrections”


8.The program should terminate/end after step number 7






Note: There are a few different solutions and methods to solve this problem.I should not see any identical programs.The program will take roughly 70-90 lines of code.This is somewhat dependent on how many separate print statements you use when creating your questions and displaying the results.





Suggestions


1.Fully test your code. Does it work for every scenario?If you are collecting “letters” from the user, does your program properly handle both lowercase and uppercase versions?


2.Give all your variables meaningful names.To you
q1
might seem like a good variable name, but
ques1
or
question1
would be better.


3.Be careful of copy/paste errors.Since some of this code is repetitive, you can copy and paste some pieces but be careful to change variables names and labels appropriately.

Sep 25, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here