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

 Evaluation: 10 points total --> 2 points for pseudocode; 2 points

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

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!