answer.
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
abruzzese [7]
2 years ago
10

A simplified main program used to test functions is called

Computers and Technology
1 answer:
padilas [110]2 years ago
8 0
<span>A simplified main program used to test functions is called <u><em>formula</em></u>
</span><span />
You might be interested in
Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. (Use the Internet to
Dima020 [189]

Answer:

  1. import random  
  2. states = {
  3.    "Alabama": "Montgomery",
  4.    "California": "Sacramento",
  5.    "Florida": "Tallahassee",
  6.    "Hawaii": "Honolulu",
  7.    "Indiana": "Indianapolis",
  8.    "Michigan": "Lansing",
  9.    "New York": "Albany",
  10.    "Texas" : "Austin",
  11.    "Utah" : "Salt Lake City",
  12.    "Wisconsin": "Madison"
  13. }
  14. correct = 0
  15. wrong = 0
  16. round = 1
  17. while(round <= 5):
  18.    current_state = random.choice(list(states))
  19.    answer = input("What is the capital of " + current_state + ": ")
  20.    
  21.    if(answer == states[current_state]):
  22.        correct += 1
  23.    else:
  24.        wrong += 1
  25.    
  26.    round += 1
  27. print("Correct answer: " + str(correct))
  28. print("Wrong answer: " + str(wrong))

Explanation:

The solution code is written in Python 3.

Line 3 -14

Create a dictionary of US States with capital as each of their corresponding value. Please note only ten sample states are chosen here.

Line 16 - 18

Create variables to track the number of correct and inaccurate response and also round counter.

Line 19 - 28

Set the while condition to enable user to play the quiz for five questions and use random.choice to randomly pick a state from the dictionary and prompt user to input the capital of selected stated.

If the answer matched with the capital value of the selected state, increment the correct counter by one. Otherwise the wrong counter will be incremented by one. Increment the round counter by one before proceed to next round.

Line 30 - 31

Print the number of correct responses and wrong responses.

7 0
2 years ago
Which of the following statements are true. .ascii stores string in memory and terminate it with NULL character. There is no way
Tems11 [23]

Answer:

The true statements are:

There is an assembler directive to arrange / place floating point values in static data memory

MARS always uses setting '.set boat'

Explanation:

It is the assembler directive who arranges and places the floating point values for the static data memory. Obviously there is no such way for the MIPS assemble programming for reservation of the static data memory without having any initialization for a considerable value.

MARS would definitely use the setting set “noat” ascii would store the string in the memory and then terminate it with respect to NULL character. They cannot reserve the MIPS assembly programming for a considerable value.

4 0
2 years ago
Which component of a computer is its input device and what role does it play in a document?
kogti [31]
The keyboard is used to input information. (Entering data)
5 0
2 years ago
Read 2 more answers
Which of the following word pairs correctly completes the sentence below?
Julli [10]

B. negative, positive

4 0
2 years ago
Read 2 more answers
I need help asap please :) I will mark brainliest for whoever gets the right answer! x
Nina [5.8K]

1.) Average

2.) Ascending

Using this would give an average score for each team, when using the Average function, you use scores from many different games to not be biased, and it gives an accurate description of the teams scores and it's a fair way to find where they stand in respect tot he other team.

4 0
2 years ago
Other questions:
  • A telephone-repair technician uses a meter to measure voltage on a phone line. This meter is an example of _____. hardware softw
    10·2 answers
  • A new company starts up but does not have a lot of revenue for the first year. Installing anti-virus software for all the compan
    11·1 answer
  • Consider the following method intended to modify the parameter names by removing all instances of the String n.
    14·1 answer
  • Axel is finally documenting his work. What could he be writing?
    12·1 answer
  • Using the RAID controller on the motherboard, you configure three hard disks in a RAID 5 array. You leave the array unpartitione
    14·1 answer
  • Based on virtualization technologies, how many types can we classify them? Please give a brief statement on each of them?
    14·1 answer
  • (Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping o
    10·1 answer
  • Longer speeches should be separated into the paragraphs of:
    9·1 answer
  • What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
    10·2 answers
  • Consider the following code segment, which is intended to create and initialize the two-dimensional (2D) integer array num so th
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!