Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Eile Edit Yew Hbtory Bookmarks bols Help M Inbox R286 x Free Picks Da... x a sak

ID: 3864898 • Letter: E

Question

Eile Edit Yew Hbtory Bookmarks bols Help M Inbox R286 x Free Picks Da... x a sakaioURI:2.. x 2 Dialogue Botw x CSC110 midt x Practice Probl. x Las vegas od x Free Daily Spo... X H Free Parlay Cal x Camogg Study I... x c Elo Edit Yow H.. X https sakai. item/11693685/group/e3dbb580-16f5-430f affo-88196032a87c/Practice Exam/CSC midterm. practice pdf 90k e Q, ind cheap cruise A D In this section, you need to provide short answers. 1. What does it mean that an algorithm needs to halt Illustrate your answer by a simple example, 2. Briefly describe the difference between a syntax emor and a nun-time error? 3. Briefly describe when it is preferred to use a while loop' and when it is preferred to use a for loop. 4. What is the difference between a Boolean variable and an int variable? 5. "Functions can only take one input parameter. It is illegal to define functions with multiple input parameters or with no input parameters". Briefly discuss why this statement is false. Part II: Python Syntax (10 points) For each of the following four questions, write ONE line of python code in the given boxes: and prompts the user to enter an income value. The value entered by the user should be saved in a variable called mlncome which is of type float. 2. points) The following list stores a list of toddler names in a daycare toddlers Abba Dalila Iverem Kaya Nishan Saran Write a one line command that would change Kaya' to 'Teru' 3. (25 points) Write a python statement to execute the following mathematical equation: ONote that Vr can is the same as writing x 05) 3b-c 4, points) Write an if statement that would check if variable k is greater an or equal to 100 AND less than 200

Explanation / Answer

county_sales_tax = .025 state_sales_tax = .05 # Enter the purchase price def main(): purchase = float(input('Enter the price of the purchase: ')) calculate_totals(purchase) # Calculate the purchase price with the coounty and state sales tax def calculate_totals(purchase): county_sales_tax = purchase * .025 state_sales_tax = purchase * .05 total_sales_tax = county_sales_tax + state_sales_tax total_price = purchase + state_sales_tax + county_sales_tax # display the amount of the purchases, county and state sales # taxes, combined amount of the both taxes and total sale with taxes def display_totals(purchase, state_sales_tax, county_sales_tax, total_taxes, total_price): print('The purchase price is $, ') print('The county_sales_tax is $', format (county_sales_tax, '.2f')) print('The state_sales_tax is $', format (state_sales_tax, '.2f')) print('The total_sales_tax is $:, ') print('The total_price is $:, ') # Call the main function main()

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote