Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Evaluation: 10 points total --> 2 points for pseudocode; 2 points for attaching your file; 3 points for your code; 1 point for calling main;

image text in transcribed

Evaluation: 10 points total --> 2 points for pseudocode; 2 points for attaching your file; 3 points for your code; 1 point for calling main; 2 points for responding to 1 classmate Write a function called price_of_rocks. It has no parameters. In a while loop, get a rock type and a weight from the user. Keep a running total of the price for all requested rocks. Repeat until the user wants to quit. Quartz crystals cost $23 per pound. Garnets cost $160 per pound. Meteorite costs $15.50 per gram. Assume the user enters weights in the units as above. Return the total price of all of the material. For this discussion, you should first write pseudocode for how you would solve this problem (reference pseudocode.py in the Week 7 Coding Tutorials section for an example). Then write the code for how you would tackle this function. Please submit a Python file called rocks_discussion.py that defines the function (code) and calls it in main(). Once you've posted, respond to another person in your section. Comment on their approach, including one thing you liked about it and whether you would do anything differently. Keep it constructive

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago