Basic Terms Before Learning Programming

Character

A character is any single key on the keyboard.

Examples of characters:

  • Numbers: 0 to 9
  • Small letters: a to z
  • Capital letters: A to Z
  • White spaces: space, tab
  • Special symbols: @, #, $, %, &, etc.

Each single symbol is one character.


String

A string is a collection of one or more characters.

Examples of strings:

  • '5'
  • "5hello"
  • "naveen"
  • '909090'
  • 'hello'

Anything written inside single quotes (' ') or double quotes (" ") is a string.


Variable

A variable is like a container used to store data.

Real-life Example

Think of a glass as a variable.

The same glass can store:

  • Juice
  • Lassi
  • Soft drink
  • Water
  • Even be used as a small dustbin

Similarly, a variable can store different types of data.

In programming:

  • Variables store values
  • Values can be numbers, text, or other data

Function

A function is used to perform a specific task.

We call a function when we want that task to be done.

Real-life Example

Think of a juicer as a function.

  • Fruits or vegetables → arguments (input)
  • Juicer processes them
  • Juice → return value (output)

In programming:

  • We pass input to a function
  • The function processes it
  • The function gives output

Simple Summary
  • Character → Single keyboard symbol
  • String → Group of characters
  • Variable → Container to store data
  • Function → Performs a specific task

Important Things to Remember While Programming

  • Drink enough water.
  • Listen to calm or soothing music.
  • A computer does not have common sense (this is very important).

Let us understand the third point with a simple example.

Imagine you tell a human to walk 200 steps. If the person reaches the 100th step and finds a very hard obstacle that cannot be crossed, the person will naturally stop and come back. This happens because humans can think and make decisions on their own.

Now think about a computer. If you program a computer to go 200 steps, it will try to go all 200 steps no matter what happens in between. Even if there is an obstacle at the 100th step, the computer will still try to move forward. It will not stop or come back unless you clearly tell it to do so.

This is because a computer only follows the instructions written in the program. It cannot think, guess, or use common sense. If you want the computer to stop, turn back, or handle a problem, you must write exact instructions for that situation.

In simple words:
A computer does exactly what you tell it to do—nothing more, nothing less.

PS: By “telling the computer,” I mean writing a program.

What is website and the use of HTML?

A browser is a software used to open websites and surf the internet.
Some popular browsers are Microsoft Internet Explorer, Mozilla Firefox, and Google Chrome.

When we use a browser, we see different web pages such as Home, About Us, Contact Us, Feedback, Inbox, Outbox, and Sent Items.

A website is a group of related web pages.
Related means we can move from one web page to another using links.

A web page can contain different types of content like text, images, sound, and video.

HTML (Hyper Text Markup Language) is used to create web pages.
It is the basic language required for web development.

HTML uses tags.
Tags are written inside angular brackets (< >).

Example:
To make text bold, we use the <b> tag.

<b>some text</b>

This will show the text in bold in the browser.

To format anything on a web page, we use HTML tags.

The basic structure of an HTML page is:

<html>
      <head>
                   <title>
                         Title goes here
                    </title>
               </head>
               <body>
                             Web page content goes here
               </body>
</html>

The file must be saved with .html extension (example: index.html).
To see the output, open the file in any web browser.