LinkedIn Python Skill Assessment Quiz Answers

Which fragment of code will print exactly the same output as this fragment?

Latest Update on 25th January, 2022 by Certification Course Answers

Which fragment of code will print exactly the same output as this fragment?

import math
print(math.pow(2,10)) # prints 2 elevated to the 10th power
print(2^10)
print(2**10)
y = [x*2 for x in range(1,10)]
print(y)
y = 1
for i in range(1,10): 
    y = y * 2
print(y)

Correct Answer:

print(2**10)

Latest Updates

No posts found in this category.