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
Grace [21]
3 years ago
12

Write a function number_of_pennies() that returns the total number of pennies given a number of dollars and (optionally) a numbe

r of pennies. Ex: If you have $5.06 then the input is 5 6, and if you have $4.00 then the input is 4. Sample output with inputs: 5 6 4 506 400
Computers and Technology
2 answers:
KonstantinChe [14]3 years ago
7 0

Answer:

Code is given as:-

#number_of_pennies function with one default argument with pennies as 0 when no pennies parameter is given

def number_of_pennies(dollars,pennies = 0):

  pennies = dollars*100 + pennies #one dollar equals 100 pennies so calculate total pennies with this formula

  return pennies #return total pennies

print(number_of_pennies(int(input()),int(input()))) #both Dollars and pennies

print(number_of_pennies(int(input()))) #Dollars only

Explanation:

Here is the sample code and output.

katovenus [111]3 years ago
5 0

Answer:

The function is as follows:

def number_of_pennies(dollars,pennies=0):

   return dollars*100+pennies

   

Explanation:

This defines the function

def number_of_pennies(dollars,pennies=0):

This returns the number of pennies

   return dollars*100+pennies

<em>Note that, if the number of pennies is not passed to the function, the function takes it as 0</em>

You might be interested in
5.2
Ray Of Light [21]

Answer:

In order to reduce the risk of accidents on the roads.

Explanation:

The special equipment is used when  testing eyesight for a driver's license in order to reduce the risk of accidents on the roads. Good eyesight is very important for good and safe driving so to find out the eyesight of the driver, the license officer used special equipment in order to check driver's eyes. If the eyesight is good, the officer provide license to the person otherwise not so that no accidents happen on the road.

8 0
3 years ago
What can be can be considered data
gavmur [86]

Answer:

The amount of data you use while talking on a phone is a form of data.

Explanation:

8 0
3 years ago
A company wants to publish Knowledge articles to its Customer Community. The articles should be organized for easy navigation by
olchik [2.2K]

Answer:

Define Topics for each Knowledge article

Explanation:

Knowledge article has been written about the services or products that a company offers. It is the information related to some particular product or service. The information contain the knowledge about products, ingredients, how to use the product etc.

To provide this information to the community members, a consultant recommend that, define topic for each knowledge article. So that, a particular person can find this information by searching through topic name.

5 0
3 years ago
The opening of the throttle plate can be delayed as long as
blsea [12.9K]
<h2>I'm trying to adjust the sawtooth throttle on my H. I can open the throttle to 8 notches from the top and it is at the 1815 rated rpm. When I go above that it will overspeed, up to 2500rpm! At the last notch on the quadrant. I have tried the adjustments in the governor, the only thing I have been able to do is set the high rpm screw so it stops at the 8th notch from the top. I should be able to have full use of the quadrant and not go over the 1815 rpm, right? Does anyone have a pic of the throttle linkage under the hood and how to adjust it? I've also tried adjusting the rod in the governor between it and the carb, it is tightened all the way up now. Any ideas what I am missing?</h2>
6 0
3 years ago
2. Assume that the reference variable r refers to a serializable object. Write code that serializes the object to the file Objec
Dafna11 [192]

Answer:

Carmen Katrit rgrtun fjdidnf cucixizshdbdbdjsisjsdndbdhdhduehebbwwwhwususiussjhsdbd

3 0
2 years ago
Other questions:
  • _____ create computer programs by using their knowledge of computer science, math, and other disciplines.
    11·1 answer
  • What is one difference between a web page and a web application? Web pages provide information, while web applications allow the
    8·1 answer
  • Give an example of an input device, an output device, a storage device, and a networking device.
    10·1 answer
  • A(n) ________ moves over the spinning platters to retrieve data from the hard disk.
    6·1 answer
  • Chunking is a good strategy for completing large assignments because it makes the work
    7·2 answers
  • What two skills are most important for a meteorologist
    14·2 answers
  • Display all the natural numbers from 1 to 100 that are exactly divisible by 3 and 7 using FOR … NEXT. Without using Mod
    7·1 answer
  • WILL GIVE BRAINLIEST! The command simplify is used if you only want the first two digits of a decimal to appear in the interpret
    13·1 answer
  • What is the difference between autofocus and autocomplete
    8·1 answer
  • Word can only print documents on one size of paper.<br><br> True or false
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!