Please help me with the task: "Booleans.AreYouAGoodProgrammer"

Hello, I’m working on this task:

Add some code to make the program output that you are a good programmer if you know about if statements and bool types.

Here is my code:


namespace Booleans
{
   class AreYouAGoodProgrammer
   {     
       static void Main(string[] args)
       {
           bool knowIfStatements = true;
           bool knowBoolType = tru e;
           if ()c spy
           {
               Console.WriteLine("I'm a good programmers !");
           }69
           y789
           x6



u
h
j
h
hooih
d
d
sp


bls
lss

       }
   }
}


Can anyone please help me to solve it?

Hi Krishna_Kumar, I can see multiple errors in your code, and here is what they are so they can be removed. Firstly, you have a typo in the knowBoolType bool, where there is a space in “true” which will cause an error. Secondly, your if statement is written incorrectly. You need to put the requirements for the if statement in the parentheses, like this:

if (knowIfStatements && knowBoolType)
{
Console.WriteLine(“I’m a good programmer!”);
}

Thirdly, you need to get rid of the random letters and numbers in your code, that will cause your code to come back as an error every time for multiple reasons. After doing all of this, your code should look like this (make sure you get your indentation correct aswell. It doesn’t show up in the replies so don’t forget that, indentation is extremely important and if done incorrectly, it will cause the code to be unable to compile):

using System;

namespace Booleans
{
class AreYouAGoodProgrammer
{
static void Main(string[] args)
{
bool knowIfStatements = true;
bool knowBoolType = true;
if (knowIfStatements && knowBoolType)
{
Console.WriteLine(“I’m a good programmer!”);
}
else
{
Console.WriteLine(“I’m not a good programmer :(”);
}
}
}
}

1 Like

People who ask questions in this way usually don’t reply. But please, don’t be discouraged by it, you have great explanations, Spydergirl :+1:
Thank you for contributing to the Codeasy community!

1 Like

Thank you croatan! I do my best to help out other people who are also learning C# coding! It makes me happy to know that I’ve learned enough C# coding to be able to help programmers to be able to continue to learn, and it also makes me happy to know that I’m able to help people :slight_smile:

1 Like