We use variables to store values in our code. These values can be any data type to store anything. For example –
You can use it for characters names, or for components that you will need in your game.
Using variables in your code, help to simplify your code. It makes it easier to use your values and remember them. For example when you print, change or compare your variables, you can use the name you gave that variable instead of needing to remember the actual value inside it.
To create a variable, we need
A constant is a variable that doesn’t change in your code. This means that you cannot update the value inside your code for a constant.Â
This is helpful, when you have complicated code, but don’t want your original values to change. For example, if we want Nyxa’s name to remain constant throughout the game.Â
Let’s see how we would create a constant for Nyxa’s name below.Â
To create a constant we need:
Elektra needs to see what she’s up against. Help her by creating the following variables:
Then print them out:Â
To write these code statements, we would do the following:
//number of animals
int AnimalCount = 342;
//type of animals - 2 statements
string TypeAnimals1 = ("beasts");
string TypeAnimals2 = ("dragons")
//# levels in the game - doesn't change (constant)
const double Levels = 1.50;
//Will she win?
bool WinQuest = true;
//Print them out:
Console.WriteLine(AnimalCount);
Console.WriteLine(TypeAnimals1);
Console.WriteLine(TypeAnimals2);
Console.WriteLine(Levels);
Console.WriteLine(WinQuest);
//Click Run - this is what it will look like:
342
beasts
dragons
1.50
true
So now it’s our turn to start creating additional characters that will help Elektra.Â
Use your imagination to create the following for Elektra:
Lastly, use Console.WriteLine to print out your statements
Type your code in the below C# compiler.When you’re done, take a screenshot, save as a JPEG and submit as an assignment upload below.
Answer
Did you get it right? Your code would have looked similar to this:Â
//number of animals
int AnimalCount = 876 or 432; etc
//type of animals - 2 or more statements
string TypeAnimals1 = ("animal1");
string TypeAnimals2 = ("animal2");
//Will she win?
bool WinQuest = true or false;
//Print them out:
Console.WriteLine(AnimalCount);
Console.WriteLine(TypeAnimals1);
Console.WriteLine(TypeAnimals2);
Console.WriteLine(WinQuest);
Fabulous – now you know what variables and constants are.Â
Last thing you need to know in this section is Operators.Â
Pain Points – specific problems that prospective customers of your business are experiencing. In other words, you can think of pain points as problems, plain and simple.
 A User – is any person that interacts (by inputs) with a program without having to write the code directly. For example, you are the user to the code that makes your browser/website run. When you clicked on this pop-up, that was the input that made this explanation come up when the code detected it.
To book your spot – click here
All learners who are aspiring web developers will have an opportunity to build a website for a live NGO or charity client as part of their community service hours. This project will be run jointly with Community Hours – so all your time spent counts towards your LO credits. This event is suitable for learners, parents and their teachers.
TechWays will be providing the WordPress course and web dev resources for free to any learner wanting to participate.Â
Besides the amazing community service you’ll be doing for a charity in need – you’ll also be building your portfolio of web dev skills. Who knows – web dev could become a side hustle for extra income?
Book your spot HERE
Indentation – In the written form of many languages, an indentation or indent is an empty space at the beginning of a line to signal the start of a new paragraph.
Text editor – is the part of the IDE where you write the code. Most text editors highlight words with different properties like functions to help you distinguish them from one another.Â
Homogeneous – of the same kind; alike throughout.
Heterogeneous – diverse in character or content; containing different things
Prompt – to  cause or bring about; to make something happen. For example making someone to say or write something.
Troubleshooting is a form of problem solving, often applied to repair failed products or processes on a machine or a system. It is a logical, systematic search for the source of a problem in order to solve it, and make the product or process operational again.
There are a lot of strings functions/methods in Python. Find full list in course manual. Here’s are some that you find useful in this course:
Functions
Methods
There a number of special string characters that have different functions when used inside ” “. Here’re some useful and common ones:
In programming Concatenation is a process of appending one string to another.Â
\ – escape character is a string character that tell Python that the next character after it should be taken as a string and not as an instruction.
str ( ) is a built-in function that converts and sequence of characters (numbers especially) in to text.Â
Mad Libs is a phrasal template word game created by Leonard Stern and Roger Price. It consists of one player prompting others for a list of words to substitute for blanks in a story before reading aloud.
type ( ) is a built-in function (still to cover what built-in functions are later) that determines the Data Type of any data presented.Â
input ( ) is a built-in function (still to cover what built-in functions are later) allows a user to insert info into a program/the code.Â
print ( ) is a built-in function (still to cover what built-in functions are later) that executes data inside the brackets. The results get printed out on the console/results section.
Integrated Development Environment – A digital environment used to develop games, software, hardware, that offers integration from debugging to compiling.Â
More about variables
Info about variables
To book your spot – click here
#WOW – What Outstanding Work – Awards: join us to learn from our students.Â
Our top 20 learners are from St Andrews for Girls, Reddam Umhlanga, Evolve Online, Nova Pioneer and Sutherland High.Â
Learners will be presenting their final projects. Come celebrate their successes and lessons learnt with us at our TechWays #WOW Awards.
This event is suitable for learners, parents and their teachers. Book your spot HERE
To book your spot – click here
Â
Calling on all high schoolers interested in tech as a career. Join us on Thursday 22 September at 5:30pm.
Â
We will be sharing:
There are only 100 spaces – so book your spot now – please RSVP here Book
To access the recording – click here
Calling on all high schoolers interested in tech as a career to join us on 16 September at 5:30pm. If you missed it, we’ll host another one on 18 November.Â
We covered the following:
To access the recording – click here
To book your spot – click here
We will be talking to Noelene Kinsley from GC Network. Noelene has been specialised in the exciting career of Genetic Counseling and wants to share her passion for making the world a healthier place using genetics….and data science technology.
Let’s hear more about the trends in the health/genetics industries, where jobs are moving to and what kind of skills you’ll need in this exciting world of opportunities out there.
This event is suitable for learners, parents and their teachers. Book your spot HERE
To book your spot – click here
We will be talking to Jason Suttie from Devson. Jason has been in the tech world since he was six years old. He headed IT innovation unit at RMB and has since left to start up his own software consulting company – solving problems and building solutions for clients around the world.Â
Let’s hear more about the trends in the software and programming industries, where jobs are moving to and what kind of skills you’ll need in this exciting world of opportunities out there.Â
Book your spot HERE
Introduces Linux as an operating system, the basic open source concepts and an understanding of the Linux commands. Linux is crucial for cybersecurity.
Gives you the baseline skills you need to secure a company’s systems, software and hardware. This certificate gives practical hands-on skills to pursue a career in cyber security
Will give you skills in Information Security Threats and Attack Vectors, Attack Detection, Attack Prevention, Procedures, Methodologies and more.