True or False? C# project - user input not registered correctly

Hello!

I got stuck at the ‘True or False?’ project since when the code runs all of the responses (user inputs) are show as ‘True’ (instead of ‘True’ or ‘False’ depending on the input) and that leads to the score not updating properly.

I followed the solution as well, step by step, but the problem still persists. It just drives me crazy. Where is the mistake? Thanks in advance.

Here’s the code below:

using System; namespace TrueOrFalse { class Program { static void Main(string[] args) { // Do not edit these lines Console.WriteLine("Welcome to 'True or False?'\nPress Enter to begin:"); string entry = Console.ReadLine(); Tools.SetUpInputStream(entry); string[] questions = new string[] { "Eggplants are a type of berry?", "Aliens are real?", "Is tomato a fruit?" }; bool[] answers = new bool[] { true, false, true }; bool[] responses = new bool[questions.Length]; if (questions.Length != answers.Length) { Console.WriteLine($"Warning. Restart the program."); } int askingIndex = 0; foreach (string question in questions) { string input; bool isBool; bool inputBool; Console.WriteLine(question); Console.WriteLine("True or False?"); input = Console.ReadLine(); isBool = Boolean.TryParse(input, out inputBool); while(!isBool) { Console.WriteLine($"Please respond with 'true' or 'false'"); input = Console.ReadLine(); isBool = Boolean.TryParse(input, out inputBool); } responses[askingIndex] = isBool; askingIndex++; } int scoringIndex = 0; int score = 0; foreach (bool answer in answers) { bool response = responses[scoringIndex]; Console.Write(scoringIndex + 1 + "."); Console.WriteLine($"Input: {response} | Answer: {answer}"); if (response == answer){ score++; } scoringIndex++; } Console.WriteLine($"You got {score} out of {questions.Length} correct."); } } }