0% found this document useful (0 votes)
30 views

CS 1101 Learning Guide Unit 2 Programming Assignment Home

Uploaded by

homepoet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

CS 1101 Learning Guide Unit 2 Programming Assignment Home

Uploaded by

homepoet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Learning Guide Unit 2: Programming Assignment | Home https://my.uopeople.edu/mod/book/view.php?

id=412647&chapterid=497864

In this unit, we explored the basic concepts of Python variables, operators, and expressions in Python and construct Python functions that take
arguments. Before completing this assignment, review the reading material listed below:

1. Think Python: How to think like a computer scientist Chapter 2 and 3

Ensure that you go through all the topics in chapters 2 and 3, including the examples and solving the questions in the exercises.

The circumference of a circle is calculated by 2πr, where π = 3.14159 (rounded to five decimal places). Write a function called
print_circum that takes an argument for the circle’s radius and prints the circle's circumference.

Call your print_circum function three times with di�erent values for radius.

Include the following in your part 1 submission:

• The code for your print_circum function.


• The inputs and outputs to three calls of your print_circum.

Welcome to your �rst project. Develop a catalog for a company. Assume that this company sells three di�erent Items. The seller can sell
individual items or a combination of any two items. A gift pack is a special combination that contains all three items. Here are some special
considerations:

A. If a customer purchases individual items, he does not receive any discount.

B. If a customer purchases a combo pack with two unique items, he gets a 10% discount.

C. If the customer purchases a gift pack, he gets a 25% discount.

Write a function for the above scenario. Perform the calculations in code wherever applicable. The function should be your own creation, not
copied from any other source. The �nal output should look like:

1 of 3 4/18/2024, 9:02 PM
Learning Guide Unit 2: Programming Assignment | Home https://my.uopeople.edu/mod/book/view.php?id=412647&chapterid=497864

Include the following in your part 2 submission:

• The code for the function that you created.


• The Output of the code.
• A description of what feature(s) your function illustrates.
• The code and its output must be explained technically. The explanation can be provided before or after the code, or in the form of
comments within the code.

If you use an informational source, be sure to identify the source and share the link to the source you used.

• Submit the solutions to both part 1 and part 2 in one-word document.


• Make sure your submission is double-spaced, using Times New Roman, 12-point font, with 1” margins.
• The descriptive part of your response must be at least 200 words.
• Use sources to support your arguments. Use high-quality, credible, relevant sources to develop ideas that are appropriate for the
discipline and genre of the writing.
• Use APA citations and references to support your work. Add a reference list at the end of the submission. For assistance with APA
formatting, view the Learning Resource Center: Academic Writing.
• Your submission should be clearly written, concise, and well organized, and free of spelling and grammar errors. The grading will be
based on accurate solution of the problem and the quality of your writing.

Downey, A. (2015). Think Python: How to think like a computer scientist. Green Tree Press.

https://greenteapress.com/thinkpython2/thinkpython2.pdf

2 of 3 4/18/2024, 9:02 PM
Learning Guide Unit 2: Programming Assignment | Home https://my.uopeople.edu/mod/book/view.php?id=412647&chapterid=497864

3 of 3 4/18/2024, 9:02 PM

You might also like