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
alina1380 [7]
3 years ago
11

What would be the value of discountRate after the following statements are executed? double discountRate = 0.0; int purchase = 1

250; if (purchase > 1000) discountRate = .05; if (purchase > 750) discountRate = .03; if (purchase < 2500) discountRate = .01; else discountRate = 0;
Computers and Technology
1 answer:
Karolina [17]3 years ago
4 0

Answer:

The value of discountRate would be 0.01

Explanation:

double discountRate = 0.0;

     int purchase = 1250;

     if (purchase > 1000)

     discountRate = .05;

     if (purchase > 750)

     discountRate = .03;

     if (purchase < 2500)

     discountRate = .01;

     else discountRate = 0;

discountRate is declared as 0.0 then purchase is 1250. But the entire if statement is sequential, that is; all the if statement are executed.

first if-statement assign .05 to discountRate because purchase is greater than 1000.

Next if-statement re-assign .03 to discountRate because purchase is greater than 750.

The last if-statement re-assign .01 to dicountRate because purchase is less than 2500. Since this is the last if statement executed, the value of discountRate is .01

You might be interested in
Which of these are part of the CPU?<br> O peripheral<br> O HDMI cord<br> O core<br> O keyboard
Makovka662 [10]
Hiii I think the best option would be C. Core
7 0
3 years ago
Complete the function to return the factorial of the parameter using recursion.
Klio2033 [76]

def recursiveFactorial(number):

   if number > 1:

       return number * recursiveFactorial(number-1)

   else:

       return 1

stringNum = input("Enter a positive integer: ")

num = int(stringNum)

print(recursiveFactorial(num))

7 0
3 years ago
A set of independent computer systems interconnected by telecommunication links for the purpose of sharing information and resou
STALIN [3.7K]

Answer:

Network

Explanation:

  • A computer network is a set of computer systems also called nodes which are connected together via communication channels.  
  • These communication links can be telephone lines, modem (in old times) and nowadays these communication links are broadband, digital subscriber line DSL, cables, radio waves etc which are the communication links used for transmitting digital signals. Every communication link has its own data transmission speed. For example Fast Ethernet can provide data rate of 100 mbps and use coaxial cables, twisted pair cables and fiber optic cables.
  • Now what can be the nodes? These can be devices from a PC to a laptop computer or a smart phone etc.
  • The main purpose of a computer network is to share resources, communicating electronically such as videoconferencing, access to internet and exchanging data or files between the computers. These resources can be printers, storage devices etc.
  • Some types of networks are Local Area Network (LAN), Wide Area Network (WAN), Metropolitan Area Network (MAN), Internetwork (internet).
7 0
3 years ago
Sharon is troubleshooting a computer and wants to test the hard drive in another computer. Sharon removes the hard drive and not
spayn [35]

Answer:

The correct answer to the following question will be "Molex connector".

Explanation:

  • Molex connector seems to be the dialect term for the connectivity of a two-piece plug and socket. The two-piece concept was pioneered by the company named Molex Connector and has become an established electronic design.
  • Inside a PC case, it brings DC control to the devices. The wide one of those on the right is being used for discs, DVD and CD-ROM drives, whereas the narrow one is being used for floppy along with other items.

Therefore, Sharon has to use the Molex connector to test any type of drive in their device.

4 0
3 years ago
To change the overall design of an entire document to include colors, fonts, and effects, a user should apply a _____.
Olenka [21]
User should apply a theme.

Hope this helps!
8 0
3 years ago
Read 2 more answers
Other questions:
  • TCP will guarantee that your packets will arrive at the destination, as long as the connection is still established. True False
    11·1 answer
  • Please help! (I cant figure out)
    13·1 answer
  • All users on the network have antivirus software; however, several users report that they have what an administrator described a
    10·1 answer
  • What do you call the process of translating statements written by a developer? What is the result of this process?
    6·1 answer
  • A person who wants to buy a compact disc (cd) has just enough money to buy one, and chooses cd a instead of cd
    10·2 answers
  • Most manual-transmission vehicles use a _______ to gauge engine speed in RPMs. A. variable valve timer B. tachometer C. torque i
    11·1 answer
  • If you were to design a range of athletic shoes for various sports activities, what key factors would you consider during the de
    11·1 answer
  • Anyone wanna hop on 1v1.lol<br> party code : usfhb6
    12·2 answers
  • Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of
    7·1 answer
  • Steps of booting a computer
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!