Write a program that read two integers and display their MOD,VID and their floating-point division in both settings x/y and y/x
e.g 5/3 and 3/5

Answers

Answer 1

Answer:

#!/usr/bin/env python                                                          

                                                                             

                                                                             

def calculate(x, y):                                                          

   return {                                                                  

       "MOD": x % y,                                                          

       "DIV": x/y,  # you mean div instead of “VID”, right?                  

       "floating-point division": float(x)/y,                                

   }                                                                          

                                                                             

                                                                             

def calculateInBothSettings(x, y):                                            

   return {                                                                  

       "x/y": calculate(x, y),                                                

       "y/x": calculate(y, x),                                                

   }                                                                          

                                                                             

                                                                             

if __name__ == "__main__":                                                    

   x = int(input("x: "))                                                      

   y = int(input("y: "))                                                      

   print(calculateInBothSettings(x, y))

Explanation:

I wrote a python script. Example output:

x: 2

y: 3

{'x/y': {'MOD': 2, 'DIV': 0.6666666666666666, 'floating-point division': 0.6666666666666666}, 'y/x': {'MOD': 1, 'DIV': 1.5, 'floating-point division': 1.5}}


Related Questions

6. Find the heat flow in 24 hours through a refrigerator door 30.0" x 58.0" insulated with cellulose fiber 2.0" thick. The temperature inside the refrigerator is 38°F. Room temperature is 72°F. [answer in BTUs]

Answers

Answer:

The heat flow in 24 hours through the refrigerator door is approximately 1,608.57 BTU

Explanation:

The given parameters are;

The duration of the heat transfer, t = 24 hours = 86,400 seconds

The area of the refrigerator door, A = 30.0" × 58.0" = 1,740 in.² = 1.122578 m²

The material of the insulator in the door = Cellulose fiber

The thickness of the insulator in the door, d = 2.0" = 0.0508 m

The temperature inside the fridge = 38° F = 276.4833 K

The temperature of the room = 78°F = 298.7056 K

The thermal conductivity of cellulose fiber = 0.040 W/(m·K)

By Fourier's law, the heat flow through a by conduction material is given by the following formula;

[tex]\dfrac{Q}{t} = \dfrac{k \cdot A \cdot (T_2 - T_1) }{d}[/tex]

[tex]Q = \dfrac{k \cdot A \cdot (T_2 - T_1) }{d} \times t[/tex]

Therefore, we have;

[tex]Q = \dfrac{0.04 \times 1.122578 \times (298.7056 - 276.4833 ) }{0.0508} \times 86,400 =1,697,131.73522[/tex]

The heat flow in 24 hours through the refrigerator door, Q = 1,697,131.73522 J = 1,608.5705140685 BTU

Some of our modern kitchen cookware is made of ceramic materials. (a) List at least three important characteristics required of a material to be used for this application. (b) Make a comparison of three ceramic materials as to their relative properties and, in addition, to cost. (c) On the basis of this comparison, select the material most suitable for the cookware.

Answers

Answer:

A)

It should be Non- toxic

It should possess high Thermal conductivity

It should have the Required Thermal diffusivity

B)

stoneware : This material has good thermal diffusivity and it  is quite affordable and it is used in making pizza stonesporcelain: mostly used for mugs and it is non-toxic Pyrex : posses good thermal conductivity used in oven

C)   All the materials are suitable because they serve different purposes when making modern kitchen cookware

Explanation:

A) characteristics required of a ceramic material to be used as a kitchen cookware

It should be Non- toxicIt should possess high Thermal conductivityIt should have the Required Thermal diffusivity

B) comparison of three ceramic materials as to their relative properties

stoneware : This material has good thermal diffusivity and it  is quite affordable and it is used in making pizza stonesporcelain: mostly used for mugs and it is non-toxic Pyrex : posses good thermal conductivity used in ovens

C) material most suitable for the cookware.

 All the materials are suitable because they serve different purposes when making modern kitchen cookware

Question 1: What is the power observed in the energy analyzer when the rated voltage(U1) is applied to the primary of the transformer, and there is no load at the secondary?
Question 2: Find the transformation ratio of the transformer using the values U1,U2 recorded in the experiment.
Question 3: Sketch the no-load operation graph of the transformer using the values U1, I2 and the values read in the energy analyzer.
Question 4: How can we find the number of turns of transformer?
Question 5: Explain the operation principle of the transformer.
Question 6: State your final observations about the experiment.

Answers

Answer:

preguntas a parte o no???????

It describes the physical and social elements common to this work. Note that common contexts are listed toward the top, and less common contexts are listed toward the bottom. According to O*NET, what are common work contexts for Reporters and Correspondents? Check all that apply.

Answers

Answer:

Acef

Explanation:

Edginuity 2021

Answer:

2,3,4,5

Explanation:

guy above me is wrong

how do we succeed in mechanical engineering?

Answers

Think like a businessman.
Think outside your discipline.
Be a team player.
Follow the rules.
Be part of the innovation pipeline.
Make your boss look good.
Stay connected to your university.
Keep learning.

Yeah order for a firm voltage dividers to operate properly The load resistance value should be at least Times greater than resistance value of the voltage divider bleeder resistor

Answers

Answer:

A voltage divider is a simple series resistor circuit. It's output voltage is a fixed fraction of its input voltage. The divide-down ratio is determined by two resistors.

Other Questions
Read this excerpt describing the mission of the World Bank.The World Bank is a vital source of financial and technical assistance to developing countries around the world. It is not a bank in the common sense. Instead, it plays a different but supportive role in its mission of global poverty reduction and the improvement of living standards.It provides low-interest loans, interest-free credit, and grants to developing countries for education, health, infrastructure, communications, and many other purposes.According to this excerpt, what is one major way in which the World Bank differs from a regular bank?The World Bank is a source of financial assistance.The World Bank aims to improve living standards.The World Bank provides low-interest loans and credit.The World Bank serves people of different income levels. Do you agree with the idea of NBA teams requiring fans to place deposits for season tickets for the following year? What about the NBA charging higher single-game prices to nonseason ticket holders? Explain your answers. how can making a table or graph help you decide whether a rule is a function im stuck on this question The Earth's core is about the size of. A. the United States B. Pluto. C. New York City. D. Mercury. Which of the following is not a part of the inflammatory response?Group of answer choicesWhite blood cells (phagocytes) eat invading pathogens.Red blood vessels dilate.Blood flow to the area decreases.It occurs when body tissue is injured. Explain why cos E-/AB Write a Conclusion about being courageous. Put in order.Put the following steps of protein synthesis in order.12.3editingtranscriptiontranslationClear selection what is the SIGNIFICANCE of Saratoga? An article about recent developments in computerized prosthetic limbs for amputees references iron man,the marvel superhero who designs a powerful suit that enhances his abilities This reference to iron man suggests which type of allusion and meaning? A. Biblical-to suggest a moral requirement B. historical-to recall the long story of artificial limbs C. mythological- to suggest a superhuman power D. Pop culture- to suggest prosthetic limbs make human better Plz awnser asapp can someone please help me with this? help plzzzzzzzzzzzzzzzz Find the solutions to the equation x2 - 15x - 100 = 0. the table shows the results of a class survey About pets. suppose 53 students were surveyed. about how many students have one pet? Justify your answer. According to the graph, how much money is spent on education?8 million16 million12 million4 million HELP FAST PLEASE!Choose all the answers that apply.Carbon dioxide:A. is a waste product of photosynthesisB. is a waste product of respirationC. is the most abundant gas in the atmosphereD. is the leading cause of the greenhouse effectE. is released when fossil fuels are burned "Someone had told them the best times to fish were at dawn and dusk, so they stayed out alone longer than they otherwise might have. It was getting dark when they saw four men in the distance, approaching along the beach. Nadia said they should go, and Saeed agreed, and the couple walked away quickly, but the men seemed to follow, and Saeed and Nadia increased their pace, increased it as much as they could manage, even though Nadia slipped and cut her arm on the rocks. The men were gaining on them, and Saeed and Nadia began to wonder aloud what of their things they could leave behind to lighten the load, or as an offering that might sate their pursuers. Saeed said perhaps the men wanted the rod, and this seemed more reassuring to them than the alternative, which was to consider what else the men might want. So they dropped the rod, but soon after they rounded a bend and saw a house and outside the house were uniformed guards, which meant the house contained a door to a desirable place, and Saeed and Nadia had never been relieved to see guards on the island, but they were now. They came close, until the guards shouted at them to stay back, and there Saeed and Nadia stopped, making it clear they would not try to rush the house, sitting down where the guards could see them, where they felt safe, and Saeed considered whether to run back and retrieve the rod, but Nadia said it was too risky. They both regretted dropping it now. They watched for a long while but the four men never appeared, and the two of them set up their tent right there, but were unable to sleep much that night." Explain what we learn from this scene using psychoanalytic lens. Pease help Marking Brainiest 5A rectangle has a width that is 5 feet less than the length. The area of the rectangle is126 square feet. Find the width of the rectangle. (Do not type units in the answer)