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
galben [10]
2 years ago
6

Question # 2

Computers and Technology
1 answer:
CaHeK987 [17]2 years ago
6 0

Answer:

ZeroDivisionError

ValuError

Explanation: Edg 2020-2021

You might be interested in
How do you think computers have helped to improve documentation, support and services within the healthcare industry.
RideAnS [48]

Computers are the excellent means for storage of patient related data.It is often necessary to maintain detailed records of the medical history of patients. Doctors often require the information about a patient's family history, physical ailments, already diagnosed diseases and prescribed medicines.
8 0
3 years ago
Read 2 more answers
Write function d2x() that takes as input a nonnegative integer n (in the standard decimal representation) and an integer x betwe
Rufina [12.5K]

Answer:

The function in Python is as follows:

def d2x(d, x):

   if d > 1 and x>1 and x<=9:

       output = ""

       while (d > 0):

           output+= str(d % x)

           d = int(d / x)

       output = output[::-1]

       return output

   else:

       return "Number/Base is out of range"

Explanation:

This defines the function

def d2x(d, x):

This checks if base and range are within range i.e. d must be positive and x between 2 and 9 (inclusive)

   if d >= 1 and x>1 and x<=9:

This initializes the output string

       output = ""

This loop is repeated until d is 0

       while (d > 0):

This gets the remainder of d/x and saves the result in output

           output+= str(d % x)

This gets the quotient of d/x

           d = int(d / x) ----- The loop ends here

This reverses the output string

       output = output[::-1]

This returns the output string

       return output

The else statement if d or x is out of range

<em>    else:</em>

<em>        return "Number/Base is out of range"</em>

<em />

4 0
3 years ago
What is meant by the term text?
krek1111 [17]

Answer:

It's D

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
miv72 [106K]

Answer:

The cpp program to print US presidential years is given.

#include <iostream>

using namespace std;

int main()

{

   // variable to hold presidential election year declared  

   int elec_year;

// variable to hold presidential election year initialized to 1792  

elec_year=1792;

   

// the value displayed on the console output

   std::cout << "The U.S. presidential election years from 1792 to present day are listed. " << std::endl;

   

   // loop executes till year is less than or equals 2020

   do

   {

       // initial value is printed

       std::cout << elec_year << std::endl;

       

       // value is incremented by 4

       elec_year = elec_year + 4;

       

   }while(elec_year<=2020);

   return 0;

}

OUTPUT

The U.S. presidential election years from 1792 to present day are listed.  

1792

1796

1800

1804

1808

1812

1816

1820

1824

1828

1832

1836

1840

1844

1848

1852

1856

1860

1864

1868

1872

1876

1880

1884

1888

1892

1896

1900

1904

1908

1912

1916

1920

1924

1928

1932

1936

1940

1944

1948

1952

1956

1960

1964

1968

1972

1976

1980

1984

1988

1992

1996

2000

2004

2008

2012

2016

2020

Explanation:

The program works as described.

1. An integer variable, elec_year, is declared and initialized with the first US presidential year value, 1792.

2. Inside the do-while loop, the variable, elec_year, is first printed to the console followed by a new line inserted using, endl.

3. The variable, elec_year, is then incremented by 4.

4. The do-while loop continues till the value of the variable, elec_year, does not exceeds the current year, 2020.

5. The program ends with a return statement since main() has return type int.

6. Only one variable is used in the program.

7. The program consists of only main() method since cpp is not completely object oriented programming language.

8. The same program, if written in object oriented programming language like java or c# will be written inside a class and executed through main() method.

4 0
2 years ago
You created the following dictionary relationships = {'Jimmy':'brother', 'Carol':'sister'}. You then executed the following code
dybincka [34]

Answer:

This is because the key in relationships['jimmy'] is wrong. The first letter "j" should be uppercase. The key in the given dictionary is "Jimmy" and therefore a lowercase "j" will result in a KeyError exception. The key is case sensitive and therefore a minor mistake in a single letter either in lowercase or uppercase will cause the error. The correct usage of key to address the value should be relationships["Jimmy"].

3 0
3 years ago
Other questions:
  • Regarding an intrusion detection system (IDS), stateful matching looks for specific sequences appearing across several packets i
    9·1 answer
  • Criminal Investigation people called my house on an automated voice is this a scam ??
    13·1 answer
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • If you place a semicolon after the test expression in a while loop, it is assumed to be a(n) ________. a. pre-test loop b. post-
    9·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • Analyze the following code. Number[] numberArray = new Integer[2]; numberArray[0] = new Double(1.5); Question 9 options: A) Sinc
    13·1 answer
  • Which of the following is used to describe an authentication scenario in which a user logs in using a PIN and a security token
    7·2 answers
  • You have been handed a mysterious piece of data by an unknown person. Judging by his shifty eyes and maniacal laughter you don't
    12·1 answer
  • Jonathan is in the process of creating a photo of a fluttering flag with cars moving around in the background. He wants the flag
    13·2 answers
  • State five differences between Dos and Windows.​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!