EXERCISE: Variables & data types

The people in Trom-Dlov want to know the name of the hero that will be fighting the sorcerer and the sorcerer’s name. You need to write up an online announcement to inform everyone.

Let’s unpack the C# code:

  • Line 8-9: we create the variable hero_name and sorcerer_name and give them values “Elektra” and “Nyxa“. 
  • Line 12: Prints a text plus hero_name variable.

Your instructions:

  1. On line 15: Print out sorcerer_name using Console.WriteLine (see line 12 as guidance)
  2. Click RUN. 
  3. Line 17-18: C# asks for your fave super_hero. Enter in the value. 
  4. Notice the ; semi colons after each code statement.
Want an extra challenge? 
Print out “My superhero’s name is………..” – using Console.WriteLine. 

C# code: