← Quiz: Learning and Career with AI: all 10 questions
Quiz: Learning and Career with AI · Question 2 of 10
What does compress("aaabccdddd") print?
What does compress("aaabccdddd") print?
- A.a3bc2d4
- B.a3b1c2d4
- C.abcd
- D.a3b1c2d3
Answer & explanation
Correct answer: a3b1c2d4
Each run of identical characters becomes the character plus its count, including b1.
Can you get the rest right without peeking?
Take the timed Quiz: Learning and Career with AI quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →