subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
question
Computers and Technology, 25.06.2019 17:30
Is the number of sentinels that need to agree the fact that the master is not reachable and make a failover procedure promoting slave to master.
Answers: 1
You know the right answer?
g Write a function called price_of_rocks. It has no parameters. In a while loop, get a rock type and...
Questions
question
Mathematics, 08.06.2020 15:57
question
Mathematics, 08.06.2020 15:57
question
Mathematics, 08.06.2020 15:57
question
Mathematics, 08.06.2020 15:57
question
Mathematics, 08.06.2020 15:57
question
Mathematics, 08.06.2020 15:57
Questions on the website: 13722367