View on GitHub

Yondu-Udonta

CS-1400 Project 1

Project 1: Yondu Udonta

Yondu

Questions and Answers

<– Back to project directions

Do I do this project in MindTap or somewhere else?

MindTap is for weekly homework. Projects should be done using Thonny on your desktop, or an online tool like repl.it if you don’t want to install software on your computer. If you use a tool like repl.it, keep the project private to prevent cheating.

Do I have to use the starter code you provided for this project?

You should use it because 1) it gives you an idea how to structure your code for this project and the future; 2) it gives you a peek at some techniques for programming that we will be studying in more detail later. 3) Some test cases check that you added code without breaking the code that was given.

What does it mean to round down instead of rounding up?

When you do division or multiply by a percentage, you get a floating point number. Rounding down means you drop the fractional part and just keep the whole number. Since galactic units are whole numbers, you’ll get incorrect amounts if you don’t use integer arithmetic properly.

When I add up all the amounts from the example, the total doesn’t add up to 2000. What’s wrong?

Well, did you correctly compute shore leave money? Yondu and Peter don’t get any. Yondu’s and Peter’s total amount DO include crew share, though, so don’t double count them in the total.

Why should I care about integer arithmetic in my code?

Most real numbers (floating point numbers) can’t be stored exactly in a computer in decimal form; they have to be approximated. This can sometimes lead to inaccurate or strange, inconsistent results, depending on what problem is being solved and how much precision you need. This isn’t a “Python Problem”, it’s a more general problem with computers. For many problems, this is not an issue, but we want you to be aware of it.

<– Back to project directions