Computer Science 220 Program 1 – The Weight We Carry
As stated in the course policies on the syllabus, the due date/time is firm. Do not send your assignment via email. Remember that you may submit multiple times, so there is no excuse for not submitting partial solutions. Learning objectives:
Create a Python program on your own.
Develop a simple Python program that asks for input, does arithmetic, and provides output.
Assignment: Part A - Problem Statement: This year's Convocation book was The Things They Carried, by Tim O’Brien. The book describes the things, both physical and emotional, that were carried by soldiers during the Vietnam War. Of the physical items, many were carried out of necessity while others were packed for many reasons like fear, safety, or reminders of home. Each day we carry many things: clothes, books, designer coffee, keys. AFTER completing part B of this assignment, write a program that allows the user to input the weights in grams of 3 items. Perform calculations to find the total and average weights of these items in both pounds and kilograms and display your results in a meaningful way. Use the following conversion formulas. The computer should perform all calculations based on these formulas. g / 1000 = kg kg * 2.2 = lbs Save your program as weights.py. Part B – Software Development Cycle: Applying the software development cycle aids in the process of creating software. Ask yourself, and write the answers to, questions 1-3 BEFORE implementing a solution in Python. Save your answers as a comment in your program. 1. What will the program do? 2. What will be the inputs and outputs? 3. Provide a step-by-step list of what your program must do, aka an algorithm. (Remember this is in English!) 4. Implement your design. 5. Test your program.
File to be submitted: weights.py. Your code should follow the policies provided in the Policy statement available on WebCT. Submission instructions: Log on to WebCT. Click the link for this class, CSCI 220. On the class home page, click the Assignments link. Click the words “Program 1”. Upload your files using the button provided. In the text box provided, you may enter your email address if you would like an email confirmation that your assignment was submitted. After uploading your file, be sure to press the submit button. It is not until you see the word “Success!” that you have successfully submitted your assignment.
You'll get a 7.0KB .RAR file.