Question: 5 Python-Cleo Pyramid Debugging: An Egyptian architect proposes to add a pool to the bottom third of a pyramid so that Cleopatra, Egypt's last Pharaoh,


5 Python-Cleo Pyramid Debugging: An Egyptian architect proposes to add a pool to the bottom third of a pyramid so that Cleopatra, Egypt's last Pharaoh, can have a relaxing bubble bath in the oasis in the after world. She requests that the pool should take as much as 10% of the pyramid's volume. The architect then sails all the way to the Pacific to retrieve a certain amount of pristine water from a nutrient-rich kelp forest. Unfortunately he contracts malaria and dies. In a land far away, a Roman general named Mart Antony becomes smitten with the charms of the Egyptian queen and brings back the magical water filled with potent cell-renewing antioxidants. Since the construction team has built the base of the pyramid, he promises to gift Cleopatra her desired pyramid and pool. However, no one knows where the late architect stored the hieroglyphic papyrus that contains all the crucial measurements, such as the height of the pyramid. All they know is that the volume is V = (1/3) * base_area * height. Alas, Marc Antony needs help figuring out the height that the pyramid needs to be so he can finish building and impress the queen, He's got a Python program to do this, but it doesn't work yet. Can you debug his code?
-- line 5 :#Enter the volume of the cell-renewing elixer
-- line 6 volumeE_30 = int(input())
-- line 8: #Enter the area of the base
-- line 9: areaB = int (input())
-- line 11: #print the height of the pyramid and the volume on 2 separate lines
-- line 12: #full_vol volumeE_30/ .3
-- line 13: #heighttP = 3*full_vol/areaB
--line 14: heightP = valumeE_30 / areaB
--line 16: #round the values up round()
--line 17: rndHT = round(heightP)
--line 18: print (rndHT)
-- line 20: volumeE = (rndHT * areaB / 3)
-- line 21: print (round(volumeE, 2))
C 1-Python-Simon Says: Problem Statement: In the game "Simon Says", one person plays the role of Simon, who gives instructions to everyone else playing the game. The tricky part is that if Simon begins his instruction with "Simon says" then everyone else must follow the instruction (or they lose the game); if Simon gives an instruction that does not begin with "Simon says" then everyone is supposed to completely ignore the instruction (or they lose the game)! Each input is a command made up of a properly-capitalized sequence of one or more words, separated by a single space between each pair of words, ending in a period. Some commands begin with "Simon says" while others do not. If a command begins with "Simon says", there will always be another space and at least one additional word after "says". No lines contain leading or trailing space. For each input that begins with "Simon says", output the rest of the line excluding the "Simon says ". Note that you will be removing the space after "says" as well. Each input that does not begin with "Simon says" should be ignored (do not output anything).
5 Pythion-CieoPyramid Debugging Highest grade Note: a version of this problem was given in Studio 1, but very few students completed it successfully. Let's try again An Egyptian architect proposes to add a pool to the bottom third of a pyramid so that Cleopatra, Egypt's last Pharaol, can have a relaxing bubble bath in the oasis in the afterworld. She requests that the pool should take as much as 10% of the pyramid's volume. The architect then sails all the way to the Pacific to retrieve a certain amount of pristine water from a nutrient-rich Reip forest. Unfortunately he contracts malaria and dies. In a land far away, a Roman general named Mart Antony becomes smitten with the charms of the Egyptian queen and brings back the magical water filled with potent cell-renewing antioxidants. Since the construction team has built the base of the pyramid, he promises to gift Cleopatra her desired pyramid and pool. However, no one knows where the late architect stored the hieroglyphic papyrus that contains all the crudal measurements, such as the height of the pyramid. All they know is that the volume is V. (1) bot. A, Marc Antony needs help figuring out the height that the pyramid needs to be so he can finish building and impress the queen, He's got a Python program to do this, but it doesn't work yet. Can you debug his code? Editor Submitted Versions 1 Your name and/or your partner's mane 2 # CSCT102 Section python-lucyranid 4 Enter the volure of the cell-renewing elixer 6 volueE_30 - Int(input) 7 8 Enter the area of the base Gareas - int (input()) 10 11 Worint the height of the pyramid and the volume on 2 separate lines 12 full vol volume 30/ .3 13 height - Tull_vol/areas 14 high-value 10/areal 15 16 rould the values up round() 17 ndier round(height) 18 print (PHT) 19 20 voluntariat / 21 print (round(volumet. 2) Input The first line contains the volume of the cell-renewing eller that Marc Antony brings back from the Pacific sut C 1-Python-Simon Says Highest grade 0 / 10 Problem Statement In the game "Simon Says", one person plays the role of Simon, who gives instructions to everyone else playing the game. The tricky part is that if Simon begins his instruction with "Simon says" then everyone else must follow the instruction (or they lose the game); if Simon gives an instruction that does not begin with "Simon says" then everyone is supposed to completely ignore the instruction (or they lose the game)! Each input is a command made up of a properly-capitalized sequence of one or more words, separated by a single space between each pair of words, ending in a period. Some commands begin with "Simon says" while others do not. If a command begins with "Simon says", there will always be another space and at least one additional word after "says". No lines contain leading or trailing space. For each input that begins with "Simon says", output the rest of the line excluding the "Simon says ". Note that you will be removing the space after "says" as well. Each input that does not begin with "Simon says" should be ignored (do not output anything)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
