Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python programming Computing Science 120.s10 Lab #B2- Page 2 of 5 Task 2: Lists, Loops, and Functions What outputs would be generated by the following

image text in transcribed

python programming

Computing Science 120.s10 Lab #B2- Page 2 of 5 Task 2: Lists, Loops, and Functions What outputs would be generated by the following Python segments? Try to run the following program with two different sets of inputs: 65; tax rate 41 ; tax rate Case 1: price 10 25%-. price a. Explain verbally. def HST (price, taxRate) try:+ tax= float (price) float(taRate)/100p * except print ("***Error: Wrong data type**) print ("Please try again") print()+ return tax # Main input ("Enter rice price : ")- = taxRate input ("Enter tax rate: ") 4 +4 tax HST (price, taxRate) = print("HST tax is: , tax) b. Explain verbally. change (myList) length len (myList)- myListlint (length/2)1 myList[1] "Bit" myList[-2] "coin" returne def Mouse" Main Program * change (1.2) + print (L2)+

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions