Walk through the exercises in the attached pdf

   

Added on  2022-09-06

36 Pages5753 Words28 Views
Walk through the exercises in the attached pdf, select the appropriate answer, describe
the action and upload the completed python script file
Select the appropriate output after running the following code block:
list ("abc")
Group of answer choices
abc
"abc"
['a', 'b', 'c']
a,b,c
Question 21 pts
Describe the action being executed by the former code block:
list() will take each character of “abc” and make a list.
Question 31 pts
Select the appropriate output after running the following code block:
list ((1,2,3))
Group of answer choices
1, 2, 3
(1,2,3)
123
Walk through the exercises in the attached pdf_1
[1, 2, 3]
Question 41 pts
Describe the action being executed by the former code block:
list() take each element and make a list
Question 51 pts
Select the appropriate output after running the following code block:
list([1,3,5,7,9])
Group of answer choices
1, 3, 5, 7, 9
[1, 3, 5, 7, 9]
13579
(1, 3, 5, 7, 9)
Question 61 pts
Describe the action being executed by the former code block:
list() take each element and make a list.
Flag this Question
Question 71 pts
Select the appropriate output after running the following code block:
empty_list = []
print(len(empty_list))
Group of answer choices
0
15
Walk through the exercises in the attached pdf_2
empty_list
len(empty_list)
Question 81 pts
Describe the action being executed by the former code block:
Because the list is empty, size is 0
Question 91 pts
Select the appropriate output after running the following code block:
another_empty_list=list ()
print(len(another_empty_list))
Group of answer choices
24
len(another_empty_list)
0
another_empty_list
Question 101 pts
Describe the action being executed by the former code block:
Because the list doesn’t contain any element
Question 111 pts
Select the appropriate output after running the following code block:
list("house")
Group of answer choices
house
h,o,u,s,e
['h', 'o', 'u', 's', 'e']
Walk through the exercises in the attached pdf_3
'h', 'o', 'u', 's', 'e'
Question 121 pts
Describe the action being executed by the former code block:
list() function will take each character of “house” and make a list.
Question 131 pts
Select the appropriate output after running the following code block:
list("This word")
Group of answer choices
This word
'T', 'h', 'i', 's', ' ', 'w', 'o', 'r', 'd'
['T', 'h', 'i', 's', ' ', 'w', 'o', 'r', 'd']
T,h,i,s , W,o,r,d
Question 141 pts
Describe the action being executed by the former code block:
list() will take each character of “this word” and make a list including space.
Question 151 pts
Select the appropriate output after running the following code block:
aTuple =('ready','fire','aim')
list(aTuple)
Group of answer choices
[ready, fire, aim]
'ready', 'fire', 'aim'
('ready', 'fire', 'aim')
Walk through the exercises in the attached pdf_4
['ready', 'fire', 'aim']
Question 161 pts
Describe the action being executed by the former code block:
list() converted the tuple into list.
Question 171 pts
Select the appropriate output after running the following code block:
aStringOf= "This is a string of "
aList=aStringOf.split(' ')
print(aList)
Group of answer choices
[This, is, a, string, of, ]
This is a string of
['This', 'is', 'a', 'string', 'of', '']
('This', 'is', 'a', 'string', 'of', '')
Question 181 pts
Describe the action being executed by the former code block:
split() function splits the list where space occurred and converts to list.
Question 191 pts
Select the appropriate output after running the following code block:
aDayString="5/1/2017"
aList=aDayString.split('/')
print(aList)
Group of answer choices
'5', '1', '2017'
Walk through the exercises in the attached pdf_5
['5', '1', '2017']
('5', '1', '2017')
"5/1/2017"
Question 201 pts
Describe the action being executed by the former code block:
split() function splits the list where ‘/’ occurred and converts to list.
Question 211 pts
Select the appropriate output after running the following code block:
l_lists=[[1,2,3],[2,3,4],[3,4,5]]
new_llists=[element[1:] for element in l_lists]
i=0
for element in new_llists:
print(element)
i=i+1
if i==3:
break
Group of answer choices
2, 3, 3, 4, 4, 5
(2, 3) (3, 4) (4, 5)
2, 3 3, 4 4, 5
[2, 3] [3, 4] [4, 5]
Question 221 pts
Describe the action being executed by the former code block:
element[1:] means element[1] to element[2]
Walk through the exercises in the attached pdf_6
Question 231 pts
Select the appropriate output after running the following code block:
my_list=['p','r','o','b','e']
print(my_list[0])
Group of answer choices
r
b
p
e
Flag this Question
Question 241 pts
Describe the action being executed by the former code block:
HTML EditorKeyboard Shortcuts
p is at 0th location.
Question 251 pts
Select the appropriate output after running the following code block:
my_list=['p','r','o','b','e']
print(my_list[2])
Group of answer choices
o
p
0
e
Question 261 pts
Describe the action being executed by the former code block:
Walk through the exercises in the attached pdf_7
o is at my_list[2]
Question 271 pts
Select the appropriate output after running the following code block:
n_list=["Happy",[2,0,1,5]]
print(n_list[0][1])
Group of answer choices
p
a
2
0
Flag this Question
Question 281 pts
Describe the action being executed by the former code block:
HTML EditorKeyboard Shortcuts
“Happy” is at 0th location and ‘a’ is at 1st loc.
Flag this Question
Question 291 pts
Select the appropriate output after running the following code block:
n_list=["Happy",[2,0,1,5]]
print(n_list[1][3])
Group of answer choices
y
p
5
Walk through the exercises in the attached pdf_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Python Script File : Questions and Answers | PDF
|36
|5744
|27

The appropriate output after running the following code
|26
|3481
|55

The length of the string
|25
|3481
|41