Answered step by step
Verified Expert Solution
Link Copied!

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 f-strings 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 3 units and sends them off to the Iron Lotus. (Were keeping the units simple for purposes of the problem, even though 1 standard galactic unit is about $2.33.) After the crew has gone, he and Peter count whats left and decide how to split it up among the crew. Yondu takes 13% of the total. He then gives Peter 11% 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 step(basically in 3 places: calculating peters share, youndus share and crews share) to 2 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions