Sale!

Assignment 02 Type conversion functions and arithmetic operations

Original price was: $35.00.Current price is: $30.00.

Category:
Rate this product

COMP 1405 A/B/C − “Introduction to Computer Science I”
Specification for Assignment 02
For this assignment you will demonstrate that you can use type conversion functions and arithmetic
operations as part of a program that observes the “pipeline” design pattern. You will do so by creating
a program that takes input from the user (using both a command-line argument and a call to the input
function) and then performs a complex series of operations that was assigned specifically to your
student number.
In order to complete this task, you will need to:
• find your assigned instructions on Brightspace1
• know how to use a command-line argument2
• read about the conversion functions and arithmetic operators3
• evaluate your instructions (by hand) for several inputs (to design test cases for yourself)
Your submission for this assignment:
• must be a source code file with filename4 ‘comp1405_f21_#########_assignment_02.py’
• must NOT import anything other that ‘sys’ (which is required for command-line arguments)
• must use both a command-line argument and a single call to the ‘input’ function
• must store the result in a variable, updating and printing that variable after each operation
• must print the final result to the screen using “triangle brackets” (e.g., <65>)
• can assume that the user will always enter a positive integer at any opportunity for input
1 The “Tasks for Assignment 2.pdf” document on Brightspace contains each student’s assigned instructions.
2 You may wish to refer to “live_demo_05_echo_utility.py”, as that demo exhibited the use of a command-line argument
3
In addition to being discussed in class, these subjects were also covered in Chapter 2.6 and 2.7 of our official textbook.
4 You must replace the number signs in the filename with your official nine-digit student identification number.

Reviews

There are no reviews yet.

Be the first to review “Assignment 02 Type conversion functions and arithmetic operations”

Your email address will not be published. Required fields are marked *

Scroll to Top