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
Below you will find the requirements to identify the Account Diversity Grade of a user. Read the requirements carefully and iden
igomit [66]

The technique I used to test the requirement is equivalence partitioning.

<h3>Equivalence Partitioning-</h3>

Generic test data is considered where all the test data satisfies the conditions provided in the problem. Such that,

- ADGrade A --> TA=25 LC=5

- ADGrade B --> TA=20, LC=3

- ADGrade C --> TA=8 LC=2

- ADGrade D --> TA=2, LC=1

- ADGrade null (n/a)—> TA=0, LC=0

Where:

  • TA represents totalAccounts,
  • LC represents loanTypeCount,
  • ADGrade represents accountDiversityGrade

If we are to combine the test data collected above, we would obtain the entire set of test data.

With this in mind, the minimum number of users that are required for testing the requirement is 5.

Read more about requirement testing here:

brainly.com/question/16147055

#SPJ1

8 0
1 year ago
Topic: Drivers ed 100 points and brainliest!
ddd [48]

Answer: Ill explain it!

Explanation: Modern technology is extremely beneficial to drivers because the modern cars have sensors that detect the range of other cars, when they stop and you might not see or be ready for it, your car will slam the brakes for you, this alone saves many lives. Another is like a Tesla with autopilot. Lets say for example one day your really sleepy or dont feel good, its a stress to keep the car straight. You could turn on autopilot and it could assist you with your driving, and their system has shown to be for the most part very beneficial and responsive. I would say another would be cameras above traffic lights watching for speeders and getting their license plates. This is important because people who are being risky and causing hazards on the road will get a fat ticket and will be seeing court. They are less likely to run a red light if they see a camera watching. I hope this helps you!

3 0
2 years ago
9
Aleks04 [339]
I think c is correct
5 0
11 months ago
With a(n) ____ you can arrive at a scene, acquire the data you need, and return to the lab as quickly as possible.
valkas [14]

Answer:

Your answer is initial-response field kit

Explanation:

7 0
2 years ago
What is the typical relationship between time and interest rate?
prisoha [69]
The relationship between time and interest is: time allowed to repay the loan (monthly payments)
7 0
3 years ago
Other questions:
  • Explain how the principles underlying agile methods lead to accelerated development and deployment of software.
    6·1 answer
  • 1. Create a detail report that will display all SCR courses in alphabetical order, with the course name and the instructor name
    6·1 answer
  • Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an in
    6·1 answer
  • How was windows 3 installed on a pc?
    11·1 answer
  • Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brain
    7·1 answer
  • What is the name of the most expensive car and how much is it and what are its features
    15·1 answer
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • A subroutine may be used to refer to which of the following? Check all that apply.
    15·2 answers
  • Which of these is an example of collective voice?
    8·2 answers
  • What is the action of extracting data fragments and then reassembling them in order to recover a file?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!