answer a question

Anonymous
timer Asked: Jul 4th, 2018
account_balance_wallet $15

Question description

PROBLEM #1: Suppose we wanted to compute the mileage (average mile per gallon) for a trip. We would like the user to input the beginning odometer reading, ending odometer reading, and the number of gallons used. All three of these will be floating point numbers. The program should use this information to compute the distance traveled and then the miles per gallon. Those two values should be output to the screen.

1. (a) Create an algorithm to solve the problem described above. Save your algorithm as a Word document.

(b) Convert your algorithm from part (a) to a flowchart. Be sure to include the textbox with your name, description, cs135, and date. Export this flowchart as a PDF document.

(c) Write a Python program to solve the above problem. Be sure to include at least 4 lines of comments as you did in Activity #9. Once your program has been tested and is working correctly, copy and paste it to a new Word document.

2. Write a Python program that will determine change for a dollar. The input will be amount of the item to be purchased. This will be an integer. Use the Canvas video that provided this algorithm as a guide. Be sure your program includes four lines of comments similar to other programs. Once your program has been tested and is working correctly, copy and paste it to a new Word document.

CS 135 Computer Skills for Problem Solving Summer, 2018 Activity #9 – Introduction to Python – Part I 1. Watch the video on Canvas titled "Introduction to Python" 2. (a) Visit http://repl.it (b) Where it says "Search for a Language", choose Python3 (c) Where it says "Main.py", type the following Python program: # # # # Program was written by XXX XXXX CS 135 - Computer Skills for Problem Solving Activity #9 Due: July 9, 2018 a b c d e f g h = = = = = = = = 3+5 3-5 3*5 33/5 33//5 33%5 3**5 "dog" + "house" print(a) print(b) print(c) print(d) print(e) print(f) print(g) print(h) (d) Before running this program, try to guess the output. Click on the "Run" button to execute the program. (e) If you don't understand any of the lines of output, try using Python tutorials / web sites to find the answers. (f) Copy the 8 lines of output into a new Word document. 3. Create a new Python program that will use the print statement to print the following four lines: • • • • Your full name Your major Your hometown Your experience level in computer programming Run your program to verify that it will indeed print the four lines from above. Add four lines of comments (see the first 4 lines of the previous program that begin with pound signs) to the beginning of your program. When your program is working correctly, copy it to your Word document. 4. Write a Python program that will compute the cost of putting a fence around a rectangular yard. There will be 3 inputs (length of yard, width of yard, cost per foot of fence). All of these will be floating point numbers. Use the Canvas video that provided this algorithm as a guide. Be sure your program includes four lines of comments at the top similar to the first two programs. When your program is working correctly, copy it to your Word document. How to submit: Submit the Word document described in this assignment to Canvas under Activity #9.
CS 135 Computer Skills for Problem Solving Summer, 2018 Activity #10 – Introduction to Python – Part II PROBLEM #1: Suppose we wanted to compute the mileage (average mile per gallon) for a trip. We would like the user to input the beginning odometer reading, ending odometer reading, and the number of gallons used. All three of these will be floating point numbers. The program should use this information to compute the distance traveled and then the miles per gallon. Those two values should be output to the screen. 1. (a) Create an algorithm to solve the problem described above. Save your algorithm as a Word document. (b) Convert your algorithm from part (a) to a flowchart. Be sure to include the textbox with your name, description, cs135, and date. Export this flowchart as a PDF document. (c) Write a Python program to solve the above problem. Be sure to include at least 4 lines of comments as you did in Activity #9. Once your program has been tested and is working correctly, copy and paste it to a new Word document. 2. Write a Python program that will determine change for a dollar. The input will be amount of the item to be purchased. This will be an integer. Use the Canvas video that provided this algorithm as a guide. Be sure your program includes four lines of comments similar to other programs. Once your program has been tested and is working correctly, copy and paste it to a new Word document. How to submit: Submit the 4 documents described above to Canvas under Activity #10.

Tutor Answer

wolfram777
School: UCLA

Hey, since time is running out i'm sending you the solution.There a...

flag Report DMCA
Review

Anonymous
Goes above and beyond expectations !

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors