1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NARA [144]
3 years ago
12

Help, I'm a beginner in coding! I have to write a quiz. You don't have to get all fancy and stuff, since I'm a beginner lol. I w

ill give you brainliest if I your answer is helpful!!!
Your quiz program must have the following items:


1. It must start by asking the user what their name is and welcoming them to your quiz. It pays to be polite!

2. Set up a variable to keep score. It is up to you how to design the points system. Will you give them 10 points for a correct answer and 0 for an incorrect answer? Or perhaps you will be tough and take away points for an incorrect answer!

3. Ask your 10 quiz questions. If they get a question wrong, be sure to tell the user what the correct answer was. Then, adjust the score appropriately, depending on whether their answer was right or wrong.

4. At the end of the program, tell the user their score.


NOTE: For the 10 quiz questions, you can just write "put the question here" for me, and I will just add all 10.
Computers and Technology
1 answer:
Anuta_ua [19.1K]3 years ago
6 0

name = input("What's your name? ")

print("Hello " + name + ", welcome to my quiz!")

score = 0

di = {"qustion1": "answer1", "qustion2": "answer2", "qustion3": "answer3", "qustion4": "answer4", "qustion5": "answer5", "qustion6": "answer6",

     "qustion7": "answer7", "qustion8": "answer8", "qustion9": "answer9", "qustion10": "answer10"}

for x in di:

   user_answer = input(x+" ")

   if user_answer == di[x]:

       print("That's correct!")

       score += 1

   else:

       print("The correct answer is " + str(di[x]))

print("You got "+str(score)+" out of 10!")

I iterated through a dictionary with the questions and answers as the keys and values respectively. I hope this helps!

You might be interested in
An online service provider provides its users with hosted computers, an operating system, and a database management system (DBMS
RoseWind [281]

Answer:

The correct option is B: platform as a service (PaaS)

Explanation:

Platform as a service (PaaS) is regarded as a computing model in the cloud and ensures delivery of both software and hardware tools via a third-party provider. Tools delivered are mostly those that are needed for the development of application and are mostly delivers via the internet to its users. Software and hardware tools are usually hosted in the infrastructure of the PaaS provider host and thus this removes the burden on developers of having to install a physical software or hardware in the development or running of a new application.

7 0
3 years ago
You are the Emergency Management Director of a small island nation. Your nation has come under Cyber-attack and the attackers ha
kozerog [31]

Answer:

okay actually what are you trying to get an answer for

Explanation:

8 0
2 years ago
Olivia wants to add buttons and clickable features to her website. Which language should she use?
Feliz [49]

B. HTML. I hope this helps!!!

8 0
3 years ago
Read 2 more answers
When a Select Case statement executes, the value of the test expression is compared with the values that follow each of the ____
goldenfox [79]

Answer:

Case

Explanation:

In Computer programming, a variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited.

Basically, variable stores information which is passed from the location of the method call directly to the method that is called by the program.

For example, they can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function. Therefore, when you create variables in a function, you can can set the values for their parameters.

A Select Case statement can be defined as a conditional statement that avails software developers or programmers the ability to test a variable by comparing it with a list of values.

In a Select Case statement, each variable is referred to as a Case.

Generally, when a Select Case statement executes, the value of the test expression is compared with the values that follow each of the Case keywords.

7 0
3 years ago
What are threats to computer system
4vir4ik [10]
Breach..
bugs and viruses
hack
3 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following characteristics relates to authentication header (AH)? It is a document that defines or describes compute
    11·1 answer
  • I would A lot of knowledge and education for computers and <br> Technology
    10·2 answers
  • Which option best describes the cheapest way to file your federal income taxes?
    5·1 answer
  • Find the smallest value of n such that LCM of n is 15 is 45​
    5·1 answer
  • Fill in the blank
    15·2 answers
  • Copy and paste is the only way to move text from one place to another.<br><br>True or <br>False​
    15·2 answers
  • Write any two disadvantage of First generations computers​
    14·1 answer
  • MODERATOR DELETE MY ACC
    8·2 answers
  • Radio spectrum is the part of the complete range of electromagnetic waves that is used for radio communication from
    14·1 answer
  • What is the "Driver's Compact Law"?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!