Activity

Computer Languages

Overview
Grades 3-8
15 min
Topics
Computer ScienceSTEM
Status

Learn how computer languages, syntax, and casing make it possible for humans to communicate with computers.

There are thousands of languages computer programmers use to communicate with computers to create software, applications, and other digital tools.

In this activity, you’ll learn about the top programming languages, explain the foundation of most computer languages, and write using coding language case.


These simple supplies are all you’ll need for this activity.


Digital device

Web browser

Pencil

Paper


1
Different Types of Coding Languages

When programmers write code in a specific computer language, they make a special list of directions for the computer to do things. The computer takes those directions and turns them into a language it understands so it can do what the programmer wants it to do.

We’ll look at three key types of languages.

  • Database languages
  • Development languages
  • Web coding languages

There are many languages used in computer science, each with its own strengths and weaknesses. The most popular languages include:

  • SQL: Pronounced “sequel,” this is a database language used to change a database. Searching the catalog at a library is a good example.
  • C#: Pronounced “C sharp,” this is a development language developed by Microsoft to build Windows applications, games, and business-related software.
  • Python: This is a versatile language used for web coding, web app development, artificial intelligence, and machine learning.
  • Swift: This is a language developed by Apple and used for building iOS and macOS applications. It was released in 2014 to replace Apple’s older language, Objective-C.

Other languages in computer science include Java, C++, Ruby, HTML, Go, SQL, PHP, and JavaScript. Each has a unique application that makes it best for a given job.

Websites are coded in HTML. Do you know how to find the code behind the page of any website? It’s quite easy!

  1. Using the Chrome browser, open a new tab.
  2. Go to google.com.
  3. Right-click on the screen.
  4. Select “view page source.” This will open a new browser tab to show you the code behind the webpage.
  5. Now you can switch between the webpage and the new browser tab to see the code behind each button and picture!
  6. Go to a different webpage and start over at Step 3.
Did you know?

Did You Know? While many programming languages are designed using English keywords and grammar, not all programming languages are exclusively in English. In fact, there are programming languages that use non-English keywords and word order. For example, Fjölnir, a programming language developed in Iceland, uses Icelandic keywords and word order. There are also programming languages that use other languages, such as Chinese, Japanese, and Russian.

2
Programming Syntax

In computer programming, syntax refers to the rules for writing code in a programming language. The rules tell coders what order to use keywords, symbols, and other coding elements in.

Every coding language has its own set of rules. The basic principles below apply to most languages.

  • Constants: Constants are numbers or words that are known and fixed. Fixed numbers don’t change. Examples of fixed numbers include the value of pi, or the number of minutes in an hour.
  • Variables: Variables store data in a program. Variables can be assigned values that can change throughout the program.
  • Data Types: Data types represent different types of data. Some of the most common include integers, strings and arrays.
    • Integers represent whole numbers.
    • Strings represent text, such as the phrase “I love 4-H.”
    • Arrays are a collection of data of the same type. They are usually contained in brackets, such as [3, 5, 6, 7, 9] or [Ohio, Texas, Arkansas, Hawaii].
  • Functions: Functions are groups of code that can be used multiple times within a program by referring back to the original function with a phrase or single word, making it easier to reuse groups of code.
Did you know?

Did You Know? Functions may seem complicated, but you use functions every day! Think of a function like getting ready for school.  You do not need to remember how to get ready for school every morning. Instead, it is automatic. So imagine functions are that way – a repeat of often used code that can be used over and over, but without having to retype it.

3
Coding Language Cases

In computer programming, there are several different ways you can name variables, functions, and other identifiers.

These are known as casings, and they determine how words are separated and capitalized in a name. Here’s an overview of some common casings and their differences.

  • CamelCase: CamelCase is a convention where the first word of a name is in lowercase, and each subsequent word is capitalized. The resulting name looks like the hump of a camel. For example, “firstName” and “totalAmountDue” are examples of camelCase.
  • PascalCase: PascalCase is similar to camelCase, but the first letter of each word is capitalized. PascalCase is often used for naming classes and other types in object-oriented programming. For example, “FirstName” and “TotalAmountDue” are examples of PascalCase.
  • Snake_case: Snake_case is a convention where words are separated by underscores, and all letters are in lowercase. For example, “first_name” and “total_amount_due” are examples of snake_case. Snake_case is often used in languages such as Python and Ruby.
  • Kebab-case: Kebab-case is a convention where words are separated by hyphens, and all letters are in lowercase. For example, “first-name” and “total-amount-due” are examples of kebab-case. Kebab-case is often used in URLs.

Each casing convention has its advantages and disadvantages, and which one to use often depends on personal preference or the requirements of a programming language. The most important thing is to be consistent. Coders must choose a casing convention and stick to it throughout the code.

Is there a case type you like best? Is there one that you think is the easiest to read? Practice writing your name in that case type on a piece of paper.

See how much you’ve learned about coding languages!

1

If you spoke another language, do you think it would be easier or harder to learn coding languages that were designed in the English language?

2

What advantages do you have if English is your primary language to learn to code?  What are the disadvantages of only knowing one language?

3

Would it be easier to learn a second programming language after you learn the first one? Why?

Pick a language from this activity and set a goal to research it. Where is it used the most? What resources could you use to learn this programming language? If you learned this programming language, what problem would you try to solve with it?

 

Discuss your research findings and ideas with an adult familiar with computer programming. If you don’t know any adults with computer programming experience, you can use the information you learned today to teach an adult (or even another young person) in your life about programming languages.

Share It!

Share your favorite casing convention with your friends. Pretend it is a secret code and type your text messages or send emails using this new language convention.


Computer programmers are in high demand in many industries, and this trend is expected to continue in the coming years. Overall, the demand for programmers is expected to remain high in the coming years, with the Bureau of Labor Statistics projecting a 11% job growth rate for computer and information technology occupations through 2029.

Pick a company you like and navigate to their job postings page. Chances are, the company is hiring computer programmers!

Did you enjoy this activity?

No endorsement by 4-H is implied or intended. 4-H is the youth development program for our nation’s cooperative extension system.