Question: USING PYTHON 3x 1. Write a program that takes two dates as input and calculates the number of days, months and years between them 2.

USING PYTHON 3x

USING PYTHON 3x 1. Write a program that takes two dates as

input and calculates the number of days, months and years between them

1. Write a program that takes two dates as input and calculates the number of days, months and years between them 2. Write a program that prompts the user to input an integer that represents cents. The program will then calculate the smallest combination of coins that the user has. For example, 27 cents is 1 quarter, 1 nickle and 2 pennies. 3. A day has 86,400 secs (24*60 60). Given a number in the range 1 to 86,400, output the current time as hours, minutes, and seconds with a 24-hour clock. For example: 70,000 sec is 19 hours, 26 minutes, and 40 seconds. 4. Consider a triangle with sides of length 3, 7, and 9. The law of cosines states that given three sides of a triangle (a, b, and c) and the angle C between sides a and b: C2 = 2 + b2-2 * 1 * b * cos(C). Write Python code to calculate the three angles in the triangle. 5. The radius and rass of the Earth are r = 6378 x 103 meters and m1 = 5.9742 x 1024 kg, respectively. Prompt the user to input his or her mass in kg and then calculate the gravitational force (F) and acceleration due to gravity (g) caused by the grav- itational force exerted on him/her by the Earth. Consider, F = G(m1)(m2)( and F = mg. Let the universal gravitational constant G = 6.67300 x 10-11 (in units of m3kgs2 assuming the MKS [meter-kilogram-second] syste). Check that the resulting value of g is close to 9.8m/s. [HINT: There are two formulas for F. In one, m2 is the mass in kg of the user. In the other, m is the mass in kg 6. Draw a twielve-pointed star

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!