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
Lisa [10]
2 years ago
15

Write a program that can convert an integer between 0 and 15 into hex number (including 0 and 15). the user enters an integer fr

om the console and the program displays the corresponding hex number. if the user enters an integer out of range, the program displays a warning message about the invalid.
Computers and Technology
1 answer:
valina [46]2 years ago
4 0
Range check what the user enters, if it's legit, a character array can be used.
You might be interested in
Explain why each of the following names does or does not seem like a good variable name to represent a state sales tax rate.
tatyana61 [14]

a. stateTaxRate  - A good variable name because it represents what it holds, the state sales tax rate, without being too wordy. Also correctly capitalized in camelcase.

b. txRt  - A bad variable name because while short and simple, it is too hard to understand what the variable represents.

c. t  - A very bad variable name if you plan on using the variable often. Far too short and you will forget what it represents and is needed for.

d. stateSalesTaxRateValue  - A bad variable name because it is just too wordy. Cutting it down to A's variable name is much more reasonable

e. state tax rate  - A bad variable name and probably invalid because it has spaces in the name.

f. taxRate  - A good variable name if there are no other tax calculations other than state tax rate. Otherwise you would confuse state vs local tax rate or something, making it a bad variable name.

g. 1TaxRate  - A bad variable name because the number 1 has no reason being in the variable name. It doesn't add anything to the name.

h. moneyCharged - A bad variable name because it is not specific enough in explaining why the money is being charged and what for.

7 0
2 years ago
What is one major structural difference between a decision structure (such as a decoder) and a storage structure (such as an RS
Andrej [43]

Answer:

B. The storage structure requires a clock input.

Explanation:

Logic circuits are circuits in electronics that give output based on the logic gate principle and its inputs. It can be a sequential logic circuit or a combinational logic circuit.

Decoders RS latches are combinational logic circuits because they both comprise of a combination of several sequential circuits to make their systems. The difference between decoders and RS latches is that the RS is a storage structure which is made up of flip-flops which require a clock input

8 0
1 year ago
Program documentation _____. Group of answer choices describes the inputs, outputs, and processing logic for all program modules
valentinak56 [21]

Answer:

In the given question the first line is correct, i.e. "Describes the inputs, outputs, and processing logic for all program modules".  

Explanation:

The documentation is a recorded text or image, which is preceding or in the code base of the programs, whether it describes how well the program works and how it is being used, and things in various positions can be influenced by people, and the wrong option can be described as follows:

  • In the documentation, it can't consist of rules and data.
  • In can't include a dictionary, flow maps, screen designs and device requests that began the program.
  • In can't provide links within the program.
6 0
2 years ago
A blood bank maintains two tables - DONOR, with information about people who are willing to donate blood and ACCEPTOR, with info
Kipish [7]

Answer:

The sql query is given below.

Since we need to count of males and females for a particular blood group, we put xxx for the blood group.

SELECT COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "M%") as Male_Donors,

COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "F%") as Female_Donors

FROM DONOR

WHERE BG = xxx;

Explanation:

The clauses in the query are as follows.

1. SELECT: all the columns required in the output are put in this clause.

2. FROM JOIN ON: the table(s) from which the above columns are taken are put in this clause.

3. WHERE: any condition required to filter the output is put in this clause.

The query is explained below.

1. Find the number of male donors. Number of anything can be found using COUNT() function. A query is required since gender is included in deciding the type of donor.

2. The query is defined to find number of male donors as follows.

COUNT( SELECT DID FROM DONOR WHERE GENDER LIKE "M%"; )

3. In the previous query, LIKE operator is used since it is not defined what value is stored for male donors.

4. Similarly, the query to find the number of female donors is formed.

COUNT( SELECT DID FROM DONOR WHERE GENDER LIKE "F%"; )

5. Next, the final query is formed as follows.

SELECT: both COUNT() functions will come here.

FROM: table name

WHERE: specific blood group will be put here

GROUP BY: this clause is optional and is not used in this query.

HAVING: this clause is optional and is not used in this query.

6. The query after putting all clauses is shown below.

SELECT COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "M%"),

COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "F%")

FROM DONOR

WHERE BG = xxx;

7. Alias is used in the above query for each column to get the final query.

SELECT COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "M%") as Male_Donors, COUNT(SELECT DID FROM DONOR WHERE GENDER LIKE "F%") as Female_Donors

FROM DONOR

WHERE BG = xxx;

7 0
1 year ago
Write a python 3 function named words_in_both that takes two strings as parameters and returns a set of only those words that ap
s344n2d4d5 [400]

Answer:

def words_in_both(a, b):

 a1 = set(a.lower().split())

 b1 = set(b.lower().split())

 return a1.intersection(b1)

common_words = words_in_both("She is a jack of all trades", 'Jack was tallest of all')

print(common_words)

Explanation:

Output:

{'all', 'of', 'jack'}

5 0
1 year ago
Read 2 more answers
Other questions:
  • Which of the following is ideal for long distance communication ?
    5·1 answer
  • Steps in creating a folder
    12·1 answer
  • How did josh norman and mike keller provide coverage of katrina?
    9·2 answers
  • When a typeface does not have any extra embellishments on the top and bottom of the letterforms, it is called a ________ font?
    12·1 answer
  • Jeff wants to be an archeologist. He found the information below and wants to properly cite it for his own use. The information
    15·2 answers
  • Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
    13·1 answer
  • Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
    11·2 answers
  • Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.
    5·1 answer
  • Which option in the Caption dialog box configures whether the caption appears above or below the image
    11·2 answers
  • Which is true regarding pseudocode
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!