Question: Basic Python programming. please don't use any loops or list use math operators 7.Write a program that prompts the user to enter a four-digit integer
Basic Python programming.
please don't use any loops or list
use math operators
7.Write a program that prompts the user to enter a four-digit integer and displays the number in reverse order. (hint: use math operators, using loops or list will result in a zero score)
Here is a sample run(blue user input):
Enter an integer: 3125
5
2
1
3
8.The radius and mass of the Earth are r = 6378 X 103 meters and m1 = 5.9742 X 1024 kg, respectively. Mr. Jones has a mass of m kg. Prompt the user to input m and then calculate the gravitational force (F) and acceleration due to gravity (g) caused by gravitational force exerted on him by the Earth.
The formula: g = [G(m1)(m)(r^2)] / m
Let the universal gravitational constant G = 6.67300 X 10-11 (in units of m3kg-1s-2 assuming the MKS meter-kilogram-second] system). Check that the resulting value of g is close 9.8 m/s2. The ? are decimal places-you should format to 4 decimal places.
Here is a sample run(blue user input):
Enter a mass in kg: 30
The resulting value of g is 9.8??? which is close to the earths gravitational force.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
