Write a single python program to accept n and m from user and perform the following...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a single python program to accept n and m from user and perform the following using loops A) Calculate n! [3.5 Marks] B) Multiplication table of n up to m. [3.5 Marks] Sample Output: Enter the n value: 5 Enter the m value : 3 n! means 5*4*3*2*1 = 120 Multiplication table 5*1 = 5 5 * 2 = 10 5*3= 15 Write a single python program to accept n and m from user and perform the following using loops A) Calculate n! [3.5 Marks] B) Multiplication table of n up to m. [3.5 Marks] Sample Output: Enter the n value: 5 Enter the m value : 3 n! means 5*4*3*2*1 = 120 Multiplication table 5*1 = 5 5 * 2 = 10 5*3= 15
Expert Answer:
Answer rating: 100% (QA)
Here is a Python program that accepts n and m from the user and perfor... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Develop, debug, and document a program to determine the roots of a quadratic equation, ax2 + bx + c, in either a high-level language or a macro language of your choice. Use a subroutine procedure to...
-
List and describe briefly five external factors that must be present or provided to sustain life.
-
A pendulum consists of a mass m and a massless stick of length ? The pendulum support oscillates horizontally with a position given by x(t) = A cos(?t) (see Fig.). Calculate the angle of the pendulum...
-
At present, 20-year U.K. government gilts are yielding 5.4 percent, while some 20-year U.K. corporate bonds that you are interested in are yielding 9.6 percent. Assuming that the maturity-risk...
-
Underwood, the CFO of TechCo, Inc., has used ASC 740-30 (APB 23) to avoid reporting any U.S. deferred tax expense on $50 million of the earnings of TechCos foreign subsidiaries. All of these...
-
The _ _ _ _ function enables you to retrieve separate characters in a string. A . at ( ) B . char _ at ( ) C . indexof ( ) D . value _ of ( )
-
Compute the surface area of revolution about the x-axis over the interval. y=x-lnx, [1, e]
-
Explain the two options for exporting data using the SQL Server Import and Export Wizard, and provide examples of when each option should be selected. Any version of excel.
-
A cylinder fitted with a piston contains \(1.00 \mathrm{~mol}\) of air at room temperature, \(20.0^{\circ} \mathrm{C}\). The air is slowly compressed by the piston while the temperature is kept...
-
Airplane cabins are pressurized to prevent passengers from developing altitude sickness during flight. Your altimeter watch, which uses pressure to determine altitude, indicates a cabin altitude of...
-
Consider a cylindrical container that has a radius of \(30.0 \mathrm{~mm}\) and is filled with water to a height of \(0.150 \mathrm{~m}\). If the container is at sea level, what is the pressure...
-
Blood flows through an artery that has a radius of \(3.0 \mathrm{~mm}\). What is the maximum flow speed if the volume flow rate through the artery is \(2.0 \times 10^{-6} \mathrm{~m}^{3} /...
-
A pendulum is released from an elevation of \(1.15 \mathrm{~m}\) and allowed to swing in a room filled with \(1.50 \times 10^{21}\) nitrogen molecules having an average speed of \(550 \mathrm{~m} /...
-
1) Read the following: A.) Graph the civilian labor force since 1948. What general trend can you detect in its movement over time? What can you predict about the size of the civilian labor force in...
-
Write a program that initializes an array. It inputs a value from the user and searches the number in the array.
-
Harold Conners (Social Security number 785-23-9873) lives at 13234 DeMilo Drive, Houston, TX 77052, and is self-employed for 2012. He estimates his required annual estimated tax payment for 2012 to...
-
On September 14, 2012, Jay purchased a passenger automobile that is used 75 percent in his accounting business. The automobile has a basis for depreciation purposes of $35,000, and Jay uses the...
-
Frederick (Freddy) Freeweights (age 42) owns and operates a health club called ''Treadmills West.'' The business is located at 4321 Arnold Street, Alpine, CA 91901. Freddy had the following income...
-
At what annual rate would the following have to be invested? a. \($820\) to grow to \($1,988.12\) in 13 years b. \($320\) to grow to \($423.10\) in 6 years c. \($57\) to grow to \($290.30\) in 18...
-
To what amount will the following investments accumulate? a. $6,000 invested for 12 years at 12 percent compounded annually b. $7,500 invested for 8 years at 8 percent compounded annually c. $6,400...
-
If youd like to have $5,000,000 at retirement in 45 years and you expect to earn 10 percent annually, which is around the average return over the past 50 years, what lump sum would you have to invest...
Study smarter with the SolutionInn App