paralleldrive / sudolang-llm-support

SudoLang LLM Support for VSCode
MIT License
1.07k stars 71 forks source link

There are some missing logic in teach.sudo #10

Closed coderfengyun closed 1 year ago

coderfengyun commented 1 year ago
      correctAnswers = 0
      incorrectAnswers = 0

      while (correctAnswers < questions.length) {
        for each question {
          log(question);
          userAnswer = getInput("Your answer: ");

          correct => {
            explain("${ emoji } $explanation"):length=compact;
            log("$correctAnswers / $questions.length");
          }
          incorrect => {
            explain("${ emoji } The correct answer is: $question.correctAnswer")
              :length=concise:detail=clear;
          }
        }
      }

In this section, ${correctAnswers} and ${incorrectAnswers} variables are not modified.

ericelliott commented 1 year ago

It's implied. The AI can infer it. Works in GPT-4.

coderfengyun commented 1 year ago

Great !