im using python for this code

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
Question

im using python for this code  

2
e
f
Complete the program shown in the answer box below by filling in the blank so that the program prints
4
[5, 3, 1, 5, -3]
There are multiple solutions; any one will do.
Answer: (penalty regime: 0, 10, 20, ... %)
1 def silly(stuff, more_stuff):
data = []
2
3,
for i in range(len(stuff)):
4
thing stuff[i]
=
5
if thing >= 0 or i < 2:
6
7
8
9
10
11 silly
Check
data.append(thing + i)
print(len(stuff))
data + more_stuff
print(data)
Transcribed Image Text:2 e f Complete the program shown in the answer box below by filling in the blank so that the program prints 4 [5, 3, 1, 5, -3] There are multiple solutions; any one will do. Answer: (penalty regime: 0, 10, 20, ... %) 1 def silly(stuff, more_stuff): data = [] 2 3, for i in range(len(stuff)): 4 thing stuff[i] = 5 if thing >= 0 or i < 2: 6 7 8 9 10 11 silly Check data.append(thing + i) print(len(stuff)) data + more_stuff print(data)
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr