WeLearn

Grade 11 Information Technology · Unit 6

Fundamentals of Programming

Unit 6 of the Grade 11 Information Technology textbook has 5 lessons: Types of Programming Languages, Basics of Python, Variables and Data Types, Statements and Expressions and Writing a Simple Program.

Lesson 6.1

Types of Programming Languages

A program is a set of instructions that tells a computer what to do, and a programming language is a formal language used to write those instructions. Computers only understand binary (0s and 1s), so languages are grouped by how close they are to the machine.

ProgramMachine languageAssembly languageHigh-level languageCompilerInterpreterSource code

Lesson 6.2

Basics of Python

Python is a popular high-level, general-purpose programming language created by Guido van Rossum and first released in 1991. It is known for simple, readable syntax that looks close to English, which makes it a good first language.

PythonIDLEInteractive modeScript modeprint()input()CommentSyntax error

Lesson 6.3

Variables and Data Types

A variable is a named storage location in memory that holds a value which can change while the program runs. In Python you create a variable by assigning a value with the = sign, for example age = 16.

VariableAssignmentintfloatstrboolType conversionKeyword

Lesson 6.5

Writing a Simple Program

Writing a program follows a problem-solving process often called the program development life cycle. First, understand and analyse the problem: what are the inputs, what processing is needed, and what output is expected?

AlgorithmPseudocodeFlowchartIPO chartSelectionLoopDebuggingLogic error

Practice questions

3 of the 6 questions in the Unit 6 quiz. Try each one, then reveal the answer.

  1. 1. Python is best described as a:

    • A. Machine language
    • B. High-level interpreted language
    • C. Assembly language
    • D. Markup language
    Show answer

    Answer: High-level interpreted language

    Python uses English-like statements and is run by an interpreter, making it a high-level interpreted language.

  2. 2. Which Python function displays output on the screen?

    • A. input()
    • B. print()
    • C. len()
    • D. int()
    Show answer

    Answer: print()

    print() writes values to the screen; input() reads text typed by the user.

  3. 3. What is the data type of the value 3.5 in Python?

    • A. int
    • B. str
    • C. float
    • D. bool
    Show answer

    Answer: float

    Numbers with a decimal point are floats; whole numbers are int.

Teach Information Technology Unit 6 with WeLearn

We will bring a demo to your school: a lesson on your interactive TV, a virtual lab and a classroom game, with your own teachers.