Assignment 1 Arithmetic expressions and Math Module Out: Thu Feb 18, 2021 @ 3:00 PM Due: Thu Feb 25, 2021 @ 11:59 PM General Rules You should work on the assignment individually. Group work is not allowed for this assignment. This assignment has a total of 20 marks and it is worth 10% of the course. Late submission of the assignment will lead to 10% mark deduction per day from the total mark of the assignment. If the assignment more than three days late, the student will get a zero. Plagiarism and collusion will not be tolerated. If you plagiarize any part of the assignment, or copy the answers from someone else, you will sanctioned as per the UTAS Academic Integrity and Honesty Policy See Appendix B for details on the academic integrity rule that applies to this course.. Required Submission You need to submit the following four programs. sales_discount.py - 10 marks. cal_energy.py - 10 marks. sales_discount.py A sales discount is a reduction in the price of a product that is sold by the seller. Al-Alwai hyper market wants to offer a sales discount for their customer to increase their sales. The Hyper market wants to give 20% discount for the amount purchased by the customers. Write a python program for the Hyper market to calculate a) discount and b) Payable amount for a customer using the following formulas. Your program has to read(input) purchase amount as an input and produce discount and payable amount as the output Discount = 20 % of Purchase amount Payable amount = Purchase amount - discount The payable amount and discount should be printed with two decimal places. Include the following comments at the beginning of your code. Make sure that you replace
and with the appropriate information #File Name sales_discount.py # Student Id #Student Name : Run and test your program. Once you are able to run the program successfully, submit sales_discount.py using the E-learning system. cal_energy.py In the equation, E = mc? E stands for energy, m stands for an object's mass, and c represents the speed of light(c = 3 108 m/s). The equation is known as the mass- determines its energy energy equivalence relationship. Write a program that accepts the mass of an object and The formula is: E = mc, where E energy measure in Joule, m+mass in kilogram c speed of light in m/s Include the following comments at the beginning of your code. Make sure that you replace and with the appropriate information #File Name cal energy.py # Student Id : #Student Name : Run and test your program. Once you are able to run the program successfully. submit cal_energy-py using the E-learning system A. Marking Criteria Max 6 1 1 Category Completeness and correctness (see the matrix below) Code Layout 1 consistent layout and use of proper identition and sertion between different parts of code if not using proper indentation or the layout is not consistent Code Comments 1 if using comments in the beginning of each source file and using comments to explain the code if not using comments Code Identifiers and Variatile Names 11fall identifiers are meanineuland hebluteenust students O if some identifiers are short or misleading le not capitalizing named constants) Output Organization and Formatting 1 if the output is spelt correctly organized, aligned, and formatted for maximum readability by the user o it the output is not clear. nored or difficut to understand because of unde instruction and spelling errors Table 1: Marks breakdown 1 1 Fully correct 6 5 4 2 0 Almost correct 6 4 3 1 0 Half correct 5 4 3 1 0 Mostly wrong 4 3 2 1 0 All wrong 3 2 2 1 0 Fully completed Almost completed Half completed Slight evidence of progress Noise or all irrelevant Table 2: Correctness Matrix B. Academic Integrity In case an accusation of cheating during a quiz or an examination is proven, the following will be imposed: Disciplinary Action for Cheating Case/s First Offense (Zero Mark). Second Offense (Dismissal from the College)