Question: Question 1: [1 marks] what will the following code output? def doThing (n): for in range(n,0,-3); print S) doThing (9) B. 18 C. 27 D.

 Question 1: [1 marks] what will the following code output? defdoThing (n): for in range(n,0,-3); print S) doThing (9) B. 18 C.

Question 1: [1 marks] what will the following code output? def doThing (n): for in range(n,0,-3); print S) doThing (9) B. 18 C. 27 D. the code will not run or will run indefinitely Question 2: [1 marks] what will the following code output? def doSomethingElse (x): if x> 0: while x 1: x *- abs(x) else: X +- 1 return x print (doSomethingElse (10)) A. 10 B. -10 C.-100 the code will not run or will run indefinitely

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!