← Quiz: Number Theory for Coding: all 10 questions
Quiz: Number Theory for Coding · Question 2 of 10
What does this print? (code)
What does this print?
import math
print(math.gcd(48, 36), 48 * 36 // math.gcd(48, 36))
- A.6 288
- B.12 1728
- C.4 432
- D.12 144
Answer & explanation
Correct answer: 12 144
gcd(48, 36) = 12, and lcm = 48 × 36 / 12 = 144.
Can you get the rest right without peeking?
Take the timed Quiz: Number Theory for Coding quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →