Homework 1 - HW 1 PDF

Title Homework 1 - HW 1
Course Intro Media Computation
Institution Georgia Institute of Technology
Pages 4
File Size 142.1 KB
File Type PDF
Total Downloads 92
Total Views 151

Summary

HW 1 ...


Description

CS 1315 – Fall 2020 Homework 01 Check Canvas/Gradescope for the time and date that this assignment is due Files to Submit: • hw01.py The file(s) you submit should be named exactly as specified. Letter casing matters! Please note that JES may sometimes generate additional files. Make sure you submit .py files, and not .pylog or .bak files. We will only grade the files you submit to Gradescope. Safe Submission: 1. Go back to Gradescope and double check what you have turned in. Download a copy of it and verify that it is exactly what you intended to submit. Turning in the correct file and validating that you have done that correctly is solely your responsibility. Seriously. It Is solely your responsibility. Correct submission is something that you are required to do. It is your job to verify it. 2. You can submit your homework file multiple times on Gradescope until the cut-off time. We will grade your last submission. Collaboration Policy: • Do your own work. You can discuss your homework with other people, but you are not allowed to share files or copy each other's code. • Rule: Never give or take code from another student. Period. Working together is not equivalent to copying another person's work and passing it off as your own, as that is cheating. • Do not take another person's work, nor give your work to another student (equally considered cheating). How do you prevent others from copying your work? Never, ever, under any circumstances give someone else a copy of your homework solution/code. And by never, we mean never. Not when they want to "see how you did it" nor when "I lost mine" nor when "I just need an idea of how to do it". Students are sent to the Office of Student Integrity over cheating on homework. If you give your homework to someone, that is a free opportunity to turn it in as their own. If they do, you are as guilty as they are of cheating. Period. • This homework must be completed using structures, functions, and materials that have been presented in lecture or recitation/workshop. Other Important Details: 1. If your .py file fails to load, you will receive a 0 for all coding problems 2. If your function contains an error, you will receive a 0 for that problem 3. If you fail to name your function as described in a problem, points will be deducted for that problem; please take the time to properly name your functions as described by the "Function Name" section for each problem, capitalization and spelling included 4. The test case(s) provided serve solely as examples to check your answers against; do not assume these are the only values we will test when we grade your code; your output should always match what is given for the test cases however

Coding Problems: 0. Required Name Comment 1. Hello World! 2. Tell Us About Yourself! 3. Math Problem 4. Successful Mindset 5. Payday! PROBLEM 0: Required Name Comment A set of required information that you must enter as comments. A comment is a piece of text that is preceded by the # symbol and is used to provide information to any human who might read the code. The JES interpreter ignores comments completely. Required Information: 1. A comment that includes your name 2. A comment that includes your GT e-mail address 3. A comment that includes one of the two acceptable collaboration statements: a. "I worked on the homework assignment alone, using only this semester's course materials." b. "I worked on this homework with [give the names of the people you worked with] and referred to [cite any texts, web sites, or other materials not provided as this semester's course materials for CS 1315]." For example, if your name is George Burdell, insert the following line of text (including the # symbol) at the top of your python file: # George Burdell # [email protected] # I worked on this homework assignment alone, using only this semester's # course materials.

PROBLEM 1: Hello World! Function Name: helloWorld Parameters: None Return value: None Description: Welcome to CS 1315! For this problem, write a function that prints each of the following sentences on separate lines: "World, Hello!", "Coding is fun", "This should be a good semester!". When you run this function in the command window (the black part at the bottom of JES) it should look exactly like the test case below. Happy coding! Test Cases: >>> helloWorld() World, Hello! Coding is fun This should be a good semester!

PROBLEM 2: Tell Us About Yourself! Function Name: allAboutMe Parameters: None Return Value: None Description: We want to know more about you! Write a function that prints out statements with your name, your major, and something you are excited for. The print statements should be formatted as shown below but include information about you instead. Test Cases: >>> allAboutMe() My name is Maxim. I am studying Computer Science at Georgia Tech I am looking forward to graduating at the end of this year! PROBLEM 3: Math Problem Function Name: mathProblem Parameters: None Return Value: None Description: After learning about the types of math JES can do, you have decided to give up on buying expensive calculators (your bank account will appreciate this). Write a function that prints the first two statements as shown below, and then prints the remainder of 256 divided by 15. Your function must do the math! Don't just print 1 to get the last line. Test Cases: >>> mathProblem() JES can do some math! The remainder of 256 divided by 15 equals 1 PROBLEM 4: Successful Mindset Function Name: success Parameters: None Return Value: None Description: Georgia Tech University consistently brings in the brightest minds from around the globe, and while you have the capability to succeed at this institute, the pressure, workload, and stress can at times be daunting and overwhelming. To promote a positive mindset going into the semester, we want you to write a function that prints the sentence "I can and I will be successful now and going forward!" 40 times. Make sure the punctuation and spacing is correct. There is a very quick way to do this with multiplication! Much easier than writing it all by hand. Test Cases: >>> success() I can and I will be successful now and going forward! successful now and going forward! I can and I will be going forward! I can and I will be successful now and and I will be successful now and going forward! I can successful now and going forward! I can and I will be

I can and I will be successful now and going forward! I can and I will be successful now and

going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and and I will be successful successful now and going going forward! I can and

I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and now and going forward! I can forward! I can and I will be I will be successful now and

going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward! and I will be successful now going forward!

I can and I can and I can and I can and I can and I can and I can and I can and

PROBLEM 5: Payday! Function Name: payday Parameters: • salary – an integer denoting the annual salary Return Value: None Description: As Cardi B once said, "Nothing in this world that I like more than checks!" Write a function that takes in an integer parameter, the annual salary. Given that you get paid twice a month, we want to figure out how much each paycheck would be. Depending on the annual salary, the correct semi-monthly paycheck amount will change. Your function should calculate the correct pay and print the sentence shown in the test cases below. Formatting is important! Remember to check your data types. Test Cases: >>> payday(43150) I will make $1797.9166666666667 from my next paycheck. >>> payday(87000) I will make $3625.0 from my next paycheck....


Similar Free PDFs