Skip to main content
Informatik.uz

Informatics — Grade 9

Programming in Python: variables, conditions and loops, lists, strings, functions, modules and files.

  • 11 topics
  • 4 chapters
  • 16 min

Topics

Topics are grouped into chapters and listed in reading order.

0%

Your progress

Sign in and mark the topics you finish — your progress is saved.

Start

11 topics

  1. 1

    Your First Python Program

    Python is an easy-to-learn and widely used programming language. We learn to print text, read input from the user and write comments, and then write our first program.

    Chapter 1. Python Basics1 min

  2. 2

    Variables and Data Types

    A variable stores data under a name. We study assignment, naming rules, the main data types and operations on numbers, and learn to turn entered text into a number.

    Chapter 1. Python Basics2 min

  3. 3

    The if and else Statements

    A program needs the conditional statement to make decisions. We study comparison operators, if, else, elif and logical operators, and write programs that work with age and scores.

    Chapter 1. Python Basics2 min

  4. 4

    The for and while Loops

    A loop repeats the same action many times. We study the for and while loops in Python, the range() function, leaving a loop early and avoiding endless loops.

    Chapter 1. Python Basics2 min

  5. 5

    Logical Expressions: and, or, not

    Comparison operations produce True or False. With and, or and not we combine several conditions and write programs that make complex decisions.

    Chapter 1. Python Basics2 min

  6. 6

    Working with Lists

    A list stores several values in one variable. We learn to access items by index, add and remove them, and loop over a list.

    Chapter 2. Lists and Strings1 min

  7. 7

    Strings and String Operations

    A string is a sequence of characters. We combine, slice, measure and search strings to process text data.

    Chapter 2. Lists and Strings1 min

  8. 8

    Creating Functions: def and Parameters

    A function is a named piece of code that can be called many times. We create our own functions with def and pass data to them through parameters.

    Chapter 3. Functions and Modules1 min

  9. 9

    Functions That Return a Value: return

    The return statement sends the result a function has calculated back to where it was called. With it we build complex programs from small functions.

    Chapter 3. Functions and Modules1 min