MP1 worksheet

MP1 worksheet

Comments:





***************** gas_mileage    *****************


gas_mileage output with inputs of 300 miles and 12.3 gallons

Enter the number of gallons that was used by your car:12.3
Enter the distance that was travelled by your car:300
Mileage of the car:24.390243902439025Miles Per Gallon
____________________________________



***************** averager    *****************


averager output with inputs of 11, 15, and 24.

Enter the three integers:11
15
24
Integers entered: 11,15and24
Average of the integers:16.666666666666668
___________________________________



***************** jar    *****************


Output from your jar program

Enter the amount of quarters that are in the jar:2
Enter the amount of dimes that are in the jar:1
Enter the amount of nickels that are in the jar:2
Enter the amount of pennies that are in the jar:3

The jar contains73cents.____________________________________



***************** make_change    *****************

Output from your make_change program

Enter the total price in dollars:
4
Enter the price in cents:
23
Enter the money that was recieved in dollars:
5
Enter the money that was recieved in cents:
50

CHange that was returned:
-3dollar(s)
-2quarter(s)
-2dime(s)
0nickel(s)
5pennies____________________________________

4.29
7
Cyker 130 points

                                    MP1 worksheet

Comments:





***************** gas_mileage    *****************


gas_mileage output with inputs of 300 miles and 12.3 gallons
____________________________________



***************** averager    *****************


averager output with inputs of 11, 15, and 24.
____________________________________



***************** jar    *****************


Output from your jar program
____________________________________



***************** make_change    *****************

Output from your make_change program
____________________________________

4.29 (7 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source