Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm confused on how to do this while Loops Discussion - (10 points) Write a function called price_of_rocks. It has no parameters. In a while
I'm confused on how to do this
while Loops Discussion - (10 points) 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) (2pts). Then write the code for how you would tackle this function. Please submit a Python file called rocks_discussion.py (2pts) that defines the function (code) (3pts) and calls it in main() (1pt). 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! (2pts) NOTE: Please make sure to select to post in the section with the letter in the code. It should look something like this: ISTA_130_SEC101A_2201-1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started