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]
4 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]4 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
Select the qualification that is best demonstrated in each example. Trinity recommends investment strategies to customers. Laris
Viefleur [7K]

Answer:

1:decision making skills 2:integrity 3:communication 4:computer skill

Explanation:

got it right on edg 2020

pov: Your behind on classes

7 0
3 years ago
Read 2 more answers
Edward is a composer and needs to listen to the most accurate music files to create his compositions. What audio file type shoul
svetoff [14.1K]

Answer:

MP3

Explanation:

From the question we are informed about Edward who is a composer and needs to listen to the most accurate music files to create his compositions. In this case, the audio file type he should use to record his music is MP3 format. MP3 format Is an audio format which is a coding use in digital audio with high quality that can be used to store songs on the computer without taking much space, but with good quality. MP3 offer to listen to his/her music clearly.

4 0
3 years ago
Betty took her friends bowling. they rented 4 lane. 10 people need rent shoes and
bogdanovich [222]
First there are two groups, members and non-members, so you know that there are 4 people who are members, if you subtract 4 from ten that would mean 6 people are non-members. now, for the cost of the members would be (7.50 × 4) + (2.95 × 4) = 41.8$
for the non-member group or would be (9.75 × 6) + (3.95 ×6) = 82.2$ now add 41.8 to 82.2 which equals 124.0$ in total
4 0
4 years ago
The concept of taking traffic that’s all aimed at the same node and delivering it to the proper receiving service is known as
Cerrena [4.2K]

Answer:

"Demultiplexing" is the right answer.

Explanation:

  • A procedure for retransferring into genuine distinct, independent signals a transmission combining numerous digital as well as analog components, is considered as Demultiplexing.
  • Lending incoming different segments towards appropriate application-level procedures instead on the positive side of the recipient.
7 0
3 years ago
Question #1
trasher [3.6K]
The answers is 25 because it is 25 due to the GB
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which keyword helps you remember how to operate an extinguisher? A. MASH B. PASS C. PASH D. DASH
    11·2 answers
  • What statement needs to be included below to retrieve all rows from the Invoices table with InvoiceTotal greater than 100?
    9·1 answer
  • Which of the following queries can have a Fully Meets result? Select all that apply. True False [adobe website], English (US) Tr
    7·1 answer
  • A coworker is concerned about the veracity of a claim because the sender of an email denies sending it. The coworker wants a way
    6·1 answer
  • Which is an example of a local government enforcing a national law?
    5·2 answers
  • Which of the following statements are true regarding Steve Jobs and Steve Wozniak? Select 3 options.
    5·2 answers
  • Explain by details operator overloading in C++ with example
    6·1 answer
  • Is a pocket watch consider a computer
    15·1 answer
  • Which of the two do you think is the most secure mode of communicating: sending a letter using the postal service or sending an
    9·1 answer
  • What is the name for the last word on a dictionary page?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!