EXERCISE: Data Types

Let’s find out some information about the land of Trom-Dlov. 

We will be using data types in this exercise. We will be learning all about these in the next topic, but let’s see what you can figure out by yourself by doing this exercise:

Let’s unpack the C# code:

  • Line 6: animals is a variable of type int and there are 342 animals in the land. 
  • Line 10: suburb is a variable of type char – and “E” suburb is where Nyxa lives.
  • Line 13: Nyxa_evil is a variable of type bool – and of course it’s TRUE

Your instructions:

  1. Change the number of animals to 400
  2. An error was made on the code in Line 9. Fix it by changing the text “suburb where Nyxa lives” to a comment 
  3. click Run (First fix the error – otherwise it won’t run).

C# code: