63 816
Assignments Done
99,5%
Successfully Done
In August 2018

Answer to Question #791 in Python for mina

Question #791
Assume that a variable named plist refers to a list with 12 elements, each of which is an int . Assume that the variable k refers to a value between 0 and 6 . Write a statement that assigns 15 to the list element whose index is k .

and

Assume that a variable named plist has been defined and is associated with a list that consists of 12 elements. Assume further that k refers to an int between 2 and 8 . Assign 22 to the element just before the element in plist whose index is k .
Expert's answer
plist = [0 for x in range(12)]
for k in range (6): plist[k] = 15


plist = [0 for x in range(12)]
for k in range (3,7): plist[k] = 22

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
19.10.10, 19:10

UPDATE SomeTableName SET username = CONCAT('x', username);

Assignment Expert
19.10.10, 17:58

Not exactly, "int between 2 and 8" means that k takes the values 3,4,5,6,7 (see above fixed code), but thank you for drawing attention to this.

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions