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
erik [133]
3 years ago
11

You are going to write a program for Computer test which will read 10 questions from a file, order them randomly and provide the

test to the user. When the user done the program must give the user his final score
Computers and Technology
1 answer:
ollegr [7]3 years ago
3 0

Answer:

from pprint import pprint

import random

match = {

   "mcq1": "a",

   "mcq2": "c",

   "mcq3": "c",

   "mcq4": "d",

   "mcq5": "a",

   "mcq6": "a",

   "mcq7": "a",

   "mcq8": "b",

   "mcq9": "d",

   "mcq10": "a"

}

file = open("test","r")

questions = set()

for i in range(10):

   ques = []

   for line in file:

       if "-" in line:

           break

       else:

           ques.append(line)

   questions.add(tuple(ques))

def quiz(questions, match):

   questions = list(questions)

   marks = 0

   for i in range(10):

       pprint(questions[i])

       mcq = "mcq",str(i+1)

       mcq = list(mcq)

       answer = input("enter your answer: ")

       if answer == match["".join(mcq)]:

           marks += 1

   return marks

print("Your score is: ",quiz(questions, match))

Explanation:

the file which has been loaded is test, and its data is provided below...

mcq1. The device which converts analog signals to digtital signals and vice versa is called.

a) mother board

b) TAP

c) Modem

d) I/O device

-

mcq2. The main components of a computer system are.

a) TAP, CPU, Printer

b) CPU, Input device

c) CPU, ALU, CU

d) CPU , Output device , Memory unit, Control unit

-

mcq3. A source program is a program.

a) writter in machine laguage

b) translated in machine langaue

c) written in high level language

d) required to boot a computer

-

mcq4.Which image format supports transparency in images.

a) PNG

b) GIF

c) JPG

d) A & B

-

mcq5. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq6. UNICODE is an example of.

a) character encoding set

b) driver

c) software

d) database

-

mcq7. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq8. NTFS stand for.

a) Network File Saving

b) New Technology File System

c) Newt Trend File Saving

d) Non Technology File System

-

mcq9. FF is example of.

a) Octal number system

b) Binary Number System

c) Decimal Number System

d) Hexadecimal number system

-

mcq10. Emails are sent with the help of ?

a) SMTP

b) FTP

c) HTTP

d) UDP

-

You might be interested in
What is Microsoft Excel?​
pashok25 [27]

Answer:

The most popular and widely used spread sheet program, developed by Microsoft Corporation of USA is called Microsoft Excel.

Explanation:

Thanks!!!!!

5 0
3 years ago
Valerie regularly generates sales reports from her organization's data warehouse. She uses these reports to create presentations
Luda [366]

Answer:

the answer is C

Explanation:

reporting tool because she has to report it before doing anything else.

5 0
3 years ago
A project manager sets up a recurring invite for meetings using a web-based calendar app on a mobile device. What type of automa
eduard

A project manager uses a mobile device's web-based calendar tool to set up recurrent meeting invitations. The type of automation this exemplifies is Intelligent automation.

<h3>What is intelligent automation?</h3>

Intelligent automation is also called alternately intelligent process automation. This is a type of software that includes artificial intelligence and robotics.

The combined software provides end-to-end business automation and quickens digital transformation. There are three types of IA. Narrow, super, and general IA.

Thus, the type of automation this exemplifies is Intelligent automation.

To learn more about intelligent automation, refer to the below link:

brainly.com/question/28222698

#SPJ4

6 0
1 year ago
I hate school...............
butalik [34]

Answer:

Check your email.

Explanation:

8 0
2 years ago
Read 2 more answers
What do you call a collection of pre-programmed commands and functions used in programs?
Keith_Richards [23]

Answer:

<h2><em>Heya</em><em> </em><em>Buddy</em><em>.</em><em>.</em></h2>

Explanation:

<em>A computer program is a collection of instructions that can be executed by a computer to perform a specific task. ... A collection of computer programs, libraries, and related data are referred to as software.</em>

<em>Hope</em><em> </em><em>that</em><em> </em><em>helps</em><em> </em><em>you</em><em> </em><em>dear</em><em>.</em><em>.</em>

<em>Bye</em><em>!</em>

6 0
2 years ago
Other questions:
  • Your mom wants to purchase a computer. She has heard about how the Windows 8 operating system is best-geared for a touch-enabled
    8·1 answer
  • A ____ network (or workgroup) consists of multiple windows computers that share information, but no computer on the network serv
    15·1 answer
  • What was the ENIAC computer and how was it used/what for?
    9·1 answer
  • What is renewable energy
    13·2 answers
  • What should you rely on to determine when to change your oil? a. Oil color b. 6,000 miles since the last oil change c. Owners ma
    7·1 answer
  • ________ uses the signals transmitted over the phone to access the database, retrieve account information and input data. Group
    11·1 answer
  • Discuss what repetitions structures are, and how they differ from the vectorization approaches we have previously studied in the
    10·1 answer
  • Your company is a small start-up that has leased office space in a building shared by other businesses. All businesses share a c
    6·1 answer
  • 3.6 Code Practice Edhesive. (PYTHON LANGUAGE)
    13·1 answer
  • If I use the command right(90), which way will Tracy turn?<br> If correct I mark brainlist
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!