hello, please read the directions and help. BELOW HERE IS THE TEMPLATE TO ADD CODES INTO IDLE.
Fantastic news! We've Found the answer you've been seeking!
Question:
hello, please read the directions and help.
BELOW HERE IS THE TEMPLATE TO ADD CODES INTO IDLE.
Transcribed Image Text:
Program: final.py Specification First, download the template file, final.py . This file contains the function names and documentation. You are required to add a header comment block with your name, the file name, the current semester, and year. Do not change the function headers, just add your implementation for each function where indicated. Add descriptive comments to your code. Remember to indent all the code for the function. Submit your completed file to Gradescope. The auto grader grade you will receive right away. I'll be manually grading your code for clarity and documentation after the due date. Here are the functions that you will write: Calculating tips is a common operation and the first function you write for the final project will do exactly that. The function calculate_tip accepts two parameters, the bill amount and the percent to tip, and returns the amount of the tip to write into the bill. The function should return the string "Invalid charge amount" if the charge is not more that 0 and "Invalid tip percent" if the tip is less than 0. Function heading: def calculate_tip(charge, tip_percent): Parameter Specification: charge is the total charge and tip_percent is the % of total Return Value Specification: the amount to tip based on the charge and percent given Sample Function Call: calculate_tip(27.5, 20) Sample Return Value: 5.5 Sample Function Call: calculate_tip(-1.0, 15) Sample Return Value: Invalid charge amount Sample Function Call: calculate_tip(27.5, -1) Sample Return Value: Invalid tip percent The VCU bulletin (http://bulletin.vcu.edu/academic-regs/ugrad/classification/) lists the number of credits needed for the four undergraduate classifications. The function classify_student has an integer as a parameter and returns the string that represents the year according to this table: Year Freshmen one to 23 credit hours Credits Sophomores24 to 53 credit hours Juniors Seniors 54 to 84 credit hours 85 credit hours and more Program: final.py Specification First, download the template file, final.py . This file contains the function names and documentation. You are required to add a header comment block with your name, the file name, the current semester, and year. Do not change the function headers, just add your implementation for each function where indicated. Add descriptive comments to your code. Remember to indent all the code for the function. Submit your completed file to Gradescope. The auto grader grade you will receive right away. I'll be manually grading your code for clarity and documentation after the due date. Here are the functions that you will write: Calculating tips is a common operation and the first function you write for the final project will do exactly that. The function calculate_tip accepts two parameters, the bill amount and the percent to tip, and returns the amount of the tip to write into the bill. The function should return the string "Invalid charge amount" if the charge is not more that 0 and "Invalid tip percent" if the tip is less than 0. Function heading: def calculate_tip(charge, tip_percent): Parameter Specification: charge is the total charge and tip_percent is the % of total Return Value Specification: the amount to tip based on the charge and percent given Sample Function Call: calculate_tip(27.5, 20) Sample Return Value: 5.5 Sample Function Call: calculate_tip(-1.0, 15) Sample Return Value: Invalid charge amount Sample Function Call: calculate_tip(27.5, -1) Sample Return Value: Invalid tip percent The VCU bulletin (http://bulletin.vcu.edu/academic-regs/ugrad/classification/) lists the number of credits needed for the four undergraduate classifications. The function classify_student has an integer as a parameter and returns the string that represents the year according to this table: Year Freshmen one to 23 credit hours Credits Sophomores24 to 53 credit hours Juniors Seniors 54 to 84 credit hours 85 credit hours and more
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Problem 9- 3A Estimating and reporting bad debts P2 At December 31, 2013, Hawke Company reports the following results for its calendar year. Cash sales . . . . . . . . . . $ 1,905,000 Credit sales ....
-
Dante's Protein Powder produces a dietary supplement. The standard cost of producing one unit is: Material (1.25 pounds $2.50) ........................$ 3.13 Labor (1.2 hours $10)...
-
After hearing a seminar on organizational learning, a mining company executive argues that this perspective ignores the fact that mining companies could not rely on knowledge alone to stay in...
-
The velocity profile for turbulent flow in circular pipes is often approximated by the \(1 / 7\) thpower law: \[\bar{v}_{z}=v_{\max }(1-r / R)^{1 / 7}\] Find an expression for the cross-sectionally...
-
The customer billing and collection functions of the Misty Company, a small paint manufacturer, are attended to by a receptionist, an accounts receivable clerk, and a cashier who also serves as a...
-
Popular furniture company, IKEA, has purchased forests in Romania as well as land in Alabama to assist with keeping up with the wood demand necessary to complete customer orders. This was one way...
-
Which is not a characteristic of a direct personality type? a. They always put other people's feelings ahead of results b. They like to be in charge c. They are driven to succeed and are very...
-
Describe the number -0.832645 using one's-complement, two's-complement, and CSD formats.
-
Suppose there is a structure that is free from zero-input limit cycles, when employing magnitude truncation, and that it is also forced-input stable when using saturation arithmetic. Discuss whether...
-
The CIA suspects that one of its operatives is a double agent. Past experience indicates that 95% of all operatives suspected of espionage are, in fact, guilty. The CIA decides to administer a...
-
Synthesize a two-band lattice filter bank for the case such that \[H_{0}(z)=z^{-5}+2 z^{-4}+4 z^{-3}+4 z^{-2}+2 z^{-1}+1 .\] Determine the corresponding \(H_{1}(z)\).
-
By replacing \(z\) with \(-z\) in an RRS filter, where will its pole and zeros be located? What type of magnitude response will result?
-
Consider how the world of business interacts with the legal realm. What skills does a non-legal person need as an employee? What legal training do you feel a businessperson needs in order to make...
-
The Adjusted Trial Balance columns of a 10-column work sheet for Webber Co. follow. Complete the work sheet by extending the account balances into the appropriate financial statement columns and by...
-
During 2012, William purchases the following capital assets for use in his catering business: New passenger automobile (September 30)........................$21,500 Baking equipment (June 30)...
-
How are qualified dividends taxed in 2012? Please give the two rates of tax which apply to qualified dividends, and specify when each of these rates applies._________________________...
-
Quince Interests is a partnership with a tax year that ends September 30, 2012. During that year, Potter, a partner, received $3,000 per month as a guaranteed payment, and his share of partnership...
-
An amorphous material is: (a) Mica (b) Lead (c) Rubber (d) Glass
-
Discuss the application vernier caliper and its method of measurement.
-
In center lathe, cutting tool is fed in ____ directions with reference to the lathe axis.
Study smarter with the SolutionInn App