← Quiz: Prompting for Code: all 10 questions
Quiz: Prompting for Code · Question 4 of 10
The AI's function returns None for an empty list but you need 0.0. What is the best follow-up?
The AI's function returns None for an empty list but you need 0.0. What is the best follow-up?
- A."still wrong"
- B."make it better"
- C."For input [] it returns None; it should return 0.0. Keep everything else the same."
- D.Start a new chat with the same prompt
Answer & explanation
Correct answer: "For input [] it returns None; it should return 0.0. Keep everything else the same."
Precise feedback with the input, actual and expected output gets a precise fix.
Can you get the rest right without peeking?
Take the timed Quiz: Prompting for Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →