Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a simple program that uses these features: o Statements o Expressions o Basic data types ( int , float, string ) o Convert strings
Write a simple program that uses these features:
o Statements
o Expressions
o Basic data types int float, string
o Convert strings to int or float
o Keyboard input
o Printing to console
use fstrings when printing values
Code file: yondu.py
Problem
Yondu Udonta and his crew arrive at the Iron Lotus after several weeks of plundering various places around the galaxy. The crew has been in space for nearly six months and they are ready for a night of celebration. Yondu doesnt want to divvy up the plunder just yet, so he gives each crew member other than himself and Peter Quill units and sends them off to the Iron Lotus. Were keeping the units simple for purposes of the problem, even though standard galactic unit is about $ After the crew has gone, he and Peter count whats left and decide how to split it up among the crew. Yondu takes of the total. He then gives Peter of whats left. The next morning, Yondu divides the remaining amount evenly among all of the crew, including Yondu and Quill. The crew does not know that Yondu and Quill have already taken a cut.
The problem is to compute how many units each person gets. Round your answers at each stepbasically in places: calculating peters share, youndus share and crews share to decimal places.
It should ask a user for two pieces of information:
How many units the pirates came into port with, and
How many pirates are on the ship, including Yondu and Quill
The program should then split the units and print out
Yondus share
Peters share
The Crew share
Step 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