Below are several scripts, each involving a while loop. Select each of the scripts in which the code inside the while loop is run exactly once. ✓a. 1 = [1, 1] while 4 not in 1: 1.append(sum(1)) b. 1 = [1] m = 1 i = 2 while len(1)<3: 1.append(i) m.append(1+1) i = 1+1 c. 1 = range (17, 97) while 1: 1 = = 1[20:-20] ✓ d. x = 100 while x>0: S = 0 for x in range(100, -1, -1): S = 5+1 ༣ ✓ f. e. 1 = [1] m = 1 i = 2 while m is 1: 1 = 1+[i] m = 1+[i+1] i = 1+1 f = lambda x: lambda y: while f!=0: f = f(0)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question
Below are several scripts, each involving a while loop.
Select each of the scripts in which the code inside the while loop is run exactly once.
✓a. 1 = [1, 1]
while 4 not in 1:
1.append(sum(1))
b. 1 = [1]
m = 1
i = 2
while len(1)<3:
1.append(i)
m.append(1+1)
i = 1+1
c. 1 = range (17, 97)
while 1:
1 = = 1[20:-20]
✓ d. x = 100
while x>0:
S = 0
for x in range(100, -1, -1):
S = 5+1
༣
✓ f.
e.
1 = [1]
m = 1
i = 2
while m is 1:
1 = 1+[i]
m = 1+[i+1]
i = 1+1
f = lambda x: lambda y:
while f!=0:
f = f(0)
Transcribed Image Text:Below are several scripts, each involving a while loop. Select each of the scripts in which the code inside the while loop is run exactly once. ✓a. 1 = [1, 1] while 4 not in 1: 1.append(sum(1)) b. 1 = [1] m = 1 i = 2 while len(1)<3: 1.append(i) m.append(1+1) i = 1+1 c. 1 = range (17, 97) while 1: 1 = = 1[20:-20] ✓ d. x = 100 while x>0: S = 0 for x in range(100, -1, -1): S = 5+1 ༣ ✓ f. e. 1 = [1] m = 1 i = 2 while m is 1: 1 = 1+[i] m = 1+[i+1] i = 1+1 f = lambda x: lambda y: while f!=0: f = f(0)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning