Материалы: Основы программирования
Информатика, 9 класс. Конспекты, рабочие листы, видео, интерактивные инструменты и материалы для повторения к этой главе.
Конспекты
Учебные конспекты
Уроки главы — это и есть конспекты: прочитай их по порядку, а затем пользуйся материалами ниже.
Рабочие листы
Тренировочный лист
Реши каждый вопрос до того, как откроешь ответ, — именно там и рождается понимание.
1. Write a program that stores your favourite food in a variable and prints 'I love …'.
Create the variable first, then print it inside a longer string.
food = "pizza" print("I love " + food)
2. What is wrong with this code? `price = "9.99"` then `print(price + 1)`.
Check the type of price.
price is a string ("9.99"), so price + 1 tries to add a number to text — a TypeError. Fix: price = 9.99 or float(price) + 1.
3. Swap the values of a and b using a third variable temp.
Store one value safely before overwriting it.
temp = a a = b b = temp
Видео
Смотри и учись
Тщательно подобранные запросы, чтобы найти понятное видеообъяснение к каждому уроку.
Повторение
Контрольный список для повторения
Сможешь объяснить каждый пункт вслух, не подглядывая? Если нет — перечитай урок заново.
- A variable is a named box storing one value at a time; = assigns, it doesn't mean 'equals'.
- Core types: str (text), int (whole numbers), float (decimals), bool (True/False).
- Names must start with a letter or underscore, and should be meaningful.
- type() reveals a value's type; int(), float(), str() convert between types.
- "17" (text) and 17 (number) behave differently — the type decides what operations do.
