🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A."still wrong"
  2. B."make it better"
  3. C."For input [] it returns None; it should return 0.0. Keep everything else the same."
  4. 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 →