Computers and Technology

g 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().

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, Disd112984
Which statement is true of web-based social media? a. they allow consumers to interact with and update content. b. they cannot be updated easily, as compared to print media. c. they are expensive to produce and maintain, as compared to print and television. d. they can exist independent of the internet.
Answers: 1
image
Computers and Technology, 24.06.2019 02:30, Esmail
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
image
Computers and Technology, 24.06.2019 13:00, NycLife
Why should you evaluate trends when thinking about a career path?
Answers: 1
image
Computers and Technology, 25.06.2019 00:30, alinton06
What is a typeface? a. a collection of similar text b. a collection of similar fonts c. a collection of similar designs d. a collection of similar colors e. a collection of similar images
Answers: 1
Do you know the correct answer?
g Write a function called price_of_rocks. It has no parameters. In a while loop, get a rock type and...

Questions in other subjects:

Konu
Biology, 17.09.2020 15:01
Konu
History, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01
Konu
Mathematics, 17.09.2020 15:01