What's this C# Programming course all about?
Part 1: Fundamentals of Programming
Part 2: Programming in the real-world

Basics of Programming

Help! Trom-Dlov is under attack and you need to help Elektra by writing a programme to announce the attack to everyone so that they can escape and hide from evil Nyxa.

Oh no! you have not learnt how to write C# code or the basics of programming yet?  Not to worry, you about to gain the skills to save Trom-Dlov from Nyxa.

In order to do this you will be learning

  • What is a programme?
  • How to use variables, constants and data types to help store information you will need to save Trom-Dlov.
  • Use operators to update, compare and calculate scores in your game.

Click on the green number icons below to find out more about your learning journey in this topic.

What is a programme?

The basics

We will begin with learning what a programme is. You will also learn about the different levels of programming and some basic coding skills that will benefit you in helping Elektra to defeat Nyxa. 

So....what is a programme?

A computer programme allows you to talk to the computer. When ‘talking’ to a computer you need to use precise instructions to ask the computer to do a task

There are different ways of talking to a computer and different levels of programming languages. There are:

  • low-programming languages.
  • high-level programming languages.

Click on the tabs below to learn about the different levels of programming.

Low-level Programming Languages

Low-level programming languages are machine friendly languages.

This means that even though it is difficult for humans to understand, the computer understands it well. It is the language the computer uses to complete tasks. An example of a low-level language would be the binary number system. This binary code only uses two symbols:

  • 0
  • 1

This language is complicated for users to understand, but the computer understands it easily!

For example, if I wanted to say "I love coding!" in binary, would write it like this:

01001001 00100000 01101100 01101111 01110110 01100101 00100000 01100011 01101111 01100100 01101001 01101110 01100111 00100001

This is simple for a computer to understand. 

High-level Programming Languages

High-level languages are programmer friendly languages. This means that is easier for the programmer to understand the language. These languages are used widely for programming, they can be used to write precise instructions in a human-readable form. Some examples of this language would be:

  • C#
  • Java
  • Visual Basic

This is easier to read than binary code. For example, if i wanted to say "I love coding!" in C#, I would write:

Console.WriteLine("I love coding!");

This is much simpler compared to binary code. 

Let's look at an example

What does a programming language in C# look like?

It’s a little early for you to start coding yet. But let’s see a short code snippet in C# to get a sense of what you will be able to accomplish by the end of this Lesson. 

Read the below code snippet.

It won’t make much sense to you yet, but notice things like the (1) text colour (2) curly {} or square [ ] brackets and the (3) new words like “Console.WriteLine

Click on the green number icons below to find out more each part of the C# code.

Who's heard of C#?

Click on the cards below to find out more about C#.

Who created C#?

C# was developed in the year 2000 by Microsoft’s Anders Hejlsberg, a Danish software engineer.

Where did the name come from?

C# was originally called COOL, a clever acronym that stood for “C-like Object Oriented Language.” 

What can C# do?

C# is object orientated and can be used for website development, windows applications, games and much more!

Let's watch this video for clarity

Time to test your knowledge.

Drag and drop the correct programming language to the corresponding correct level. You’ll see there is a box for “high-level” and “low-level” language. 

How to Print?

What does it mean to print? Click on the cards below to find out. 

Everyday Life

What does it mean to print in normal everyday life?

Everyday LIfe

In everyday life when we print something, we send it from our computer to the printer, to get a physical copy. When we print in real life, we render our work on physical paper. 

Programming

What does it mean to print in programming languages?

Programming

When we want to print something in programming, we send it to another screen to display the information.
 
We type a line of code, which you will learn soon - then click RUN. This code will take our information and display it on another screen.

Let's watch this video for clarity

Let’s recap – how to print

When we want to print something, we want it output onto our Console. 

This is what a Console in C# looks like:

 

 

 

 

 

To print onto our Console, we use the keywords “Console.WriteLine”. 

We then surround what we want to print in ( normal brackets ) and add a (;) semi colon at the end. 

Look at the following example:

Console.WriteLine("Hello World!");

This will output ‘Hello World!’ onto our Console. 

Time to test your knowledge.

Help! Trom-Dlov is under attack from evil Nyxa and her beasts! You need to write up an online announcement to everyone in Trom-Dlov to run and hide. This is the only way to save them.

Fill in the missing lines of code below to announce your message across the land.

Click on the icon below for a hint. 

Think of the correct format of the code with all its necessary punctuation. 

Your turn to try

Elektra wants you to create a online warning that will be sent to all the animals and people in Trom-Dlov that Nyxa has not reached yet.

Here’s what you need to do:

  1. Type up your announcement and add it to the Console.WriteLine (“……..”); command in the below C# compiler. Use your imagination.
  2. Click run.
  3. Take a screenshot of your code and save it as a JPEG. (Google how to take screenshot)
  4. Then upload the JPEG to the assignment upload section at the end of this topic. 

Good work – you wrote your first code to help Elektra in her battle. 

But now we need to get into the real basics of programme – understanding data types, variables, constants and operators. All coming up next.

Next up: data types

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.

String Built-in Functions/Methods

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

  • len(varName) – Returns the length of a list, string
  • join(varName) – Converts the elements of an iterable into a string.

Methods 

  • varName.capitalize() – Converts the first character to upper case.
  • varName.center(length) – Returns a centered string
  • varName.count(“?”) – Returns the number of times a specified value (?) occurs in a string (varName).
  • varName.endswith(“?”) – Returns true if the string ends with the specified value.
  • varName.find(“?”) – Searches the string for a specified value and returns the position of where it was found.
  • varName.format(placeholder = value) – Formats specified values in a string.
  • varName.index(“?”) – Searches the string for a specified value and returns the position of where it was found.
  • varName.isalnum() – Returns True if all characters in the string are alphanumeric.
  • varName.isalpha() – Returns True if all characters in the string are in the alphabet.
  • varName.isascii() – Returns True if all characters in the string are ascii characters.
  • varName.isdecimal() – Returns True if all characters in the string are decimals.
  • varName.isdigit() – Returns True if all characters in the string are digits.
  • varName.isidentifier() – Returns True if the string is an identifier.
  • varName.islower() – Returns True if all characters in the string are lower case.
  • varName.isupper() – Returns True if all characters in the string are upper case.
  • varName.isnumeric() – Returns True if all characters in the string are numeric.
  • varName.isprintable() – Returns True if all characters in the string are printable.
  • varName.isspace() – Returns True if all characters in the string are whitespaces.
  • varName.istitle() – Returns True if the string follows the rules of a title.
  • varName.ljust(value) – Returns a left justified version of the string.
  • varName.rjust() Returns a right justified version of the string.
  • varName.lower() – Converts a string into lower case.
  • varName.upper() – Converts a string into upper case.
  • varName.strip() – Returns a trimmed version of the string.
  • varName.lstrip() – Returns a left trim version of the string.
  • varName.rstrip() Returns a right trim version of the string.
  • varName.partition() – Returns a tuple where the string is parted into three parts.
  • varName.replace(“old”, “new”) – Returns a string where a specified value is replaced with a specified value.
  • varName.rfind() – Searches the string for a specified value and returns the last position of where it was found.
  • varName.rindex() – Searches the string for a specified value and returns the last position of where it was found.
  • varName.rpartition() – Returns a tuple where the string is parted into three parts.
  • varName.rsplit() – Splits the string at the specified separator, and returns a list.
  • varName.split() – Splits the string at the specified separator, and returns a list.
  • varName.splitlines() – Splits the string at line breaks and returns a list.
  • varName.startswith() – Returns true if the string starts with the specified value.
  • varName.swapcase() – Swaps cases, lower case becomes upper case and vice versa.

String Special Characters

There a number of special string characters that have different functions when used inside ” “. Here’re some useful and common ones:

  • \n – Newline – Everything after it goes to next line.
  • \t – Horizontal tab – creates a tab space, similar to when you use ‘tab’ on keyboard.
  • \b – backspace – deletes the character before the it.
  • \r – carriage return – same as \n

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. 

Variables

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:

  • Some “hot button/in-demand” career pathways – including Automation
  • the skills needed to access these careers
  • some of the job realities in these careers

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:

  • general tech career tips
  • a few “hot button/in-demand” career pathways and jobs
  • the skills needed to access these careers
  • some of the job realities in these careers

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

Linux Essentials

Introduces Linux as an operating system, the basic open source concepts and an understanding of the Linux commands. Linux is crucial for cybersecurity.

Comptia
Security+

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

Certified Ethical Hacker

Will give you skills in Information Security Threats and Attack Vectors, Attack Detection, Attack Prevention, Procedures, Methodologies and more.