Question: write in Python please Write, test and document a Python program, in a file called Marscoins,py, to solve the following problem Marvin from Mars has

write in Python please  write in Python please Write, test and document a Python program,

Write, test and document a Python program, in a file called Marscoins,py, to solve the following problem Marvin from Mars has a jar full of martian currency (Maruvians, Caruvians, Taruvians and Paruvians). The breakdown of the currency units orn Mars is as follows: The single smallest unit of currency is a Paruvian. 6 Paruvians 1 Taruvian 12 Paruvians 1 Caruvian 24 Paruvians 1 Maruvian Marvin wants to share his money with his friends but he doesn.t want to carry around all those marscoins, The marscoin that weighs the least is the Maruvian, so Marvin plans to go to the Martian Bank and exchange all his other marscoins for Maruvians, then share them evenly with his friends. Any leftover Paruvians and/or Maruvians will be put back in the jar Given the number of Maruvians, Caruvians, Taruvians and Paruvians orlginally in the jar, and the number of friends that Marvin wants to share with, write a Python program to compute the total number of Maruvians that Marvin will share equally between himself and his friends before placing the leftover Paruvians and Maruvians back in the jar. Your algorithm should output the total number of Maruvians that Marvin has after going to the bank (including the ones already in the jar), the number of Maruvians that each person gets and the number of Paruvians and Maruvians that go back in the jar (If any). All output should be printed with appropriate Tabels For example, given the following input: The output should be as follows (input shown in blue): Please enter the number of Margvians: 1 Please enter the number of Caruwians: Please enter the number of frlendsi 2 Parvin has 16 Maruvian(s) in total He eives 5 Haruvian(s) to bimself and to rach of his 2 friends Parvin puts back 1 Haran) ad 20 Paruvian(s) back in the jar

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!