Question: Problem 1 : (2 pts) Part 1: Write a Python program to calculate the average of 3 hard-coded numbers assigned to three separate variables. It

Problem 1 : (2 pts)

Part 1:

  • Write a Python program to calculate the average of 3 hard-coded numbers assigned to three separate variables.
  • It is always a good idea to write a step by step algorithm for your solution before you start coding. Your algorithm should show the output of each step
  • You may use integers or floats for your numbers

Part 1:

  • Implement your algorithm in Python using abstraction
  • Generalize your program so that it works for any three numbers captured.

Problem 2: (3 pts)

Write a Python program that calculates a weight on the moon, given a weight on earth.

The user (an earthling) enters a weight on earth. Your program will print the corresponding weight on the moon, which is 16.5% of the weight on earth. Sample program output format:

Enter a weight on Earth: 120

Equivalent weight on the Moon: 19.8

Your program should be abstract enough to work for any weight entered by the user.

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!