Introduction to Programming Languages
Introduction to Programming Languages
Languages
Cracking the Code - Your Journey into
Programming Languages
• Welcome to the World of Secret Languages!
• Activity: Decode this message:
• Copy
• 3 15 13 16 21 20 5 18 19 19 16 5 1 11 9 14 3
15 4 5
• (Hint: A=1, B=2, C=3, etc.)
• Answer: COMPUTERS SPEAK IN CODE
The Ultimate Secret Language:
Programming
• Just like our number code, computers have
their own languages
• These languages allow us to command
incredibly powerful machines
What is a Programming Language?
• A formal language designed to communicate
instructions to a computer
• Consists of a set of rules (syntax) and
meanings (semantics)
Brief History of Programming Languages
• Syntax
• Semantics
• Standard Library
• Compiler/Interpreter
Types of Programming Languages
• Low-level languages (e.g., Assembly)
• High-level languages (e.g., Python, Java)
Compiled vs Interpreted Languages
• Compiled:
• Example: C++
• Converted directly to machine code
• Generally faster execution
• Interpreted:
• Example: Python
• Executed line by line
• Generally easier to debug
Simple Example: Hello World
• Python:
• print("Hello, World!")
• C++:
• #include <iostream>
• int main() {
• std::cout << "Hello, World!" << std::endl;
return 0;
• }
Why Learn About Programming Languages?