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
juin [17]
4 years ago
13

Write a method named quarterstodollars. the method should accept an int argument that is a number of quarters, and return the eq

uivalent number of dollars as a double. for example, if you pass 4 as an argument, the method should return 1.0; and if you pass 7 as an argument, the method should return 1.75.

Computers and Technology
2 answers:
enyata [817]4 years ago
7 0
 public static void quarterstodollars(String[] args) {    Scanner input = new Scanner(System.in);    System.out.println("Enter number of Quarters:");
    System.out.print("Quarters:");    int Q1 = input.nextInt();
DecimalFormat fmt = new DecimalFormat("$#,###.##");    System.out.println("Total:"+fmt.format(calctotal(Q1)));}public static double calctotal(int Q1) {    double total;    total=(0.25 * Q1);    return (total);}

Hope this helps!
Stolb23 [73]4 years ago
7 0

Answer:

def quarterstodollars():

   quarters = float(input('Enter Quarter: '))

   dollar = quarters / 4

   return dollar

print(quaterstodollars())

Explanation:

Programming language used is Python.

The program starts by first defining the function using the def keyword.

It then prompts the user to enter a quarter, the input is converted to a floating type number and it is stored in the quarters variable.

To calculate the dollar equivalent, the quarter is divided by 4.

Finally, the dollar value is returned.

The last line calls the method. check image to see the result.

You might be interested in
What are listed in the vertical columns across the top of the Event Editor?
jeka57 [31]

Answer:

a

Explanation:

7 0
4 years ago
Read 2 more answers
What piece of hardware directs traffic between the connected devices when two LAN's are communicating across the Internet?
luda_lava [24]

Answer:

The correct answer is "Router".

Explanation:

In networking, routers is one of the main hardware which is used to direct the data traffic on a LAN system.

The router also works as an interconnection system for two or more than two networks. Routers mostly work between the internet and computer which directs the data to its right path.

It works between the computer system in a premise to make the networking possible through a LAN by using switches for communication between two or more than two devices in a LAN across the internet.

Hence, the most appropriate answer is the router.

3 0
3 years ago
A(n) ____ is a named collection of data that exists on a storage medium.
MissTica
S a named collection of data that exists on a storage medium<span>.</span>
6 0
4 years ago
Martha is a healer, a healthcare provider, and an experienced nurse. She wants to share her daily experiences, as well as her 12
STALIN [3.7K]
The answer to the question is blog.
4 0
4 years ago
Read 2 more answers
True or false word inserts text to the right Of the insertion point
uysha [10]
False.................................
3 0
3 years ago
Other questions:
  • Two electronics technicians are measuring electrical quantities in circuits. Technician A says that copper, glass, porcelain, an
    13·2 answers
  • On the header and footer tools design tab you can conveniently add a header and footer page numbers and?
    15·1 answer
  • Reasons for the growth of decision-making systems include:
    13·1 answer
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • There are n coins, each showing either heads or tails. We would like all the coins to show the same face. What is the minimum nu
    6·1 answer
  • How many websites are mobile friendly?
    7·1 answer
  • Which of these statements about the truck driving occupation in the U.S. are accurate?
    12·2 answers
  • Tulio is editing his video. He used the Trim Video tab. Tulio most likely changed the
    12·1 answer
  • Which of the following is one of the first two levels of formatting in a Word document?
    5·1 answer
  • Which programming paradigm focuses on abstraction to the level of math and the elimination of side-effects and state based progr
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!