Question: Please help me with these using Python. Dont Answer This Problem! 1. Create a program that reads a pressure from the user in kilopascals. Once

 Please help me with these using Python. Dont Answer This Problem!

Please help me with these using Python.

Dont Answer This Problem!

1. Create a program that reads a pressure from the user in kilopascals. Once the pressure has been read your program should report the equivalent pressure in pounds per square inch, millimeters of mercury and atmospheres. Use your research skills to determine the conversion factors between these units. 2. The following table contains earthquake magnitude ranges on the Richter scale and their descriptors: Magnitude Less than 2.0 2.0 to less than 3.0 3.0 to less than 4.0 4.0 to less than 5.0 5.0 to less than 6.0 6.0 to less than 7.0 7.0 to less than 8.0 8.0 to less than 10.0 10.0 or more Descriptor Micro Very Minor Minor Light Moderate Strong Major Great Meteoric Write a program that reads a magnitude from the user and displays the appropriate descriptor as part of a meaningful message. For example, if the user enters 5.5 then your program should indicate that a magnitude 5.5 earthquake is considered to be a moderate earthquake. 3. The following Python program finds the smallest non-trivial (not 1) prime factor of a positive integer. n = int(input("Input an integer > 1: ")) i = 2 while (n % i) != 0: i += 1 print("The smallest factor of {0:d} is {1:d}".format(n, i)) (a) Type this program into your computer and verify that it works as advertised. Then briefly explain how it works and why the while loop always terminates. (b) Modify the program so that it tells you if the integer input is a prime number or not. If it is not a prime number, write your program so that it prints out the smallest prime factor. Using your program verify that the following integers are prime numbers: 101,8191, 94811,947431

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!