Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. def myFunc(x): 1. What is the output? 2. Correct the problem with the code: tot = 0 for ct in range(x+1): tot + ct

image text in transcribed
6. def myFunc(x): 1. What is the output? 2. Correct the problem with the code: tot = 0 for ct in range(x+1): tot + ct result myFunc(5) 7. def tripleltems(myList) return tot print (result) ist): Correct the problem with this code since the desired output is (33,63, 93]) but for el in myList: instead, the output is [11,21,31]! el -3 scList [11,21,31] tripleltems(scListl) print (scList) 8. Correct the problem with the code. The desired output is 300 but it does NOT def someFunction(t1, t2, tot): produce that! tot-t1+ t2 return tot t1= 100; t2= 200; total=0 someFunction(t1,t2,total) print total) 9 scores [100, 85,60] Correct the code. It is supposed to add 10 to every score. for sc in scores Sc + 10 print(scores)

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_2

Step: 3

blur-text-image_3

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions