To convert the inputs to dollars and cents, we make use of a combination of multiplication and addition.
The program written in Python where comments are used to explain each line is as follows:
<em />
<em>#This gets input for the number of quarters</em>
quarters = int(input("Quarters: "))
<em>#This gets input for the number of dimes</em>
dimes = int(input("Dimes: "))
<em>#This gets input for the number of nickels</em>
nickels= int(input("Nickels: "))
<em>#This gets input for the number of pennies</em>
pennies= int(input("Pennies: "))
<em>#This converts the amount to dollars and cents</em>
dollars = quarters * 0.25 + dimes * 0.10 + nickels * 0.05 + pennies * 0.01
<em>#This prints the amount to 2 decimal places</em>
print("Amount ${:.2f}".format(dollars))
Read more about Python programs at:
brainly.com/question/22841107
Answer:
Rep;ace the blank with
smaller, bigger
So, the complete line is:
smaller,bigger=order_numbers(100,99)
Explanation:
From the question, we understand that the program is to return the order of a number from least to highest
This has been well implemented in order_numbers function
Because the order function returns two values, the order_function must be called in order to accept two values and the syntax is:
<em>value1,value2 = function(return-value1,return-value2)</em>
In this case, the statement is:
smaller,bigger=order_numbers(100,99)
So, in the next line of the main, the values of smaller and bigger are printed:
<em>print(smaller,bigger)</em>
See attachment
Northbridge and Southbridge components.
Answer:
I have no clue. I wish I could help though.
Explanation:
Sorry
Answer:
1. Classes and objects
2. Inheritance
3. Polymorphism
4. Data hiding/ encapsulation
5. Interfaces.
Explanation:
Classes and objects depict the major component of the OOP (object oriented programming). It explains the object like a ball in a soccer game development.
The inheritance is like the subclass of the object. Data hiding is a stage in oop where the codes or data are hidden from another users.
In the polymorphism stage, the object is given the ability to change to a sub-object, while in the interface stage a function or method signature is defined without implementing it.