Ержанов Э

Гесен И

Айдарбаев Н

Informatics 9. Билингвальный учебник

Шаниев Е., Гесен И. и др. Informatics 9. Билингвальный учебник

Учебник для 9 класса. - Алматы: Астана-кiтап, 2019. - 173 с.

CONTENTS

PREFACE

CHAPTER 1. COMPUTER LITERACY

1.1 Negative effects of using a computer for a long time

1.2 Information properties

1.3 Collaborative work

1.4 Netiquette

1.5 Computer configuration

1.6 Selecting software

1.7 Calculating price of a computer

Check yourself

CHAPTER 2. DATABASE BASICS

2.1 What is a database?

2.2 Designing a database

2.3 Building a database

2.4 Sort and filter data

2.5 Pivot table

2.6 Charts

2.7 Mini project: family shop

Check yourself

CHAPTER 3. PROGRAMMING

3.1 Python list

3.2 Creating and adding elements to list

3.3 Search element in list

3.4 Swap elements in list

3.5 Sorting in python list

3.6 Removing elements from list

3.7 Two dimensional list in python

3.8 Sorting two dimensional list

3.9 Insert/delete values in 2d list

Check yourself

CHAPTER 4. PROGRAMMING 2D GAMES

4.1 PyGame library

4.2 Background image in PyGame

4.3 Drawing shapes. Pygame animation

4.4 Uploading characters

4.5 Moving characters using keyboard

4.6 Programming game conditions

4.7 Program Arcade Game

Check yourself

Glossary

References

PREFACE

Natural science is an exciting and very useful subject. This textbook will show you all the beauty of it and will help you become true explorers. The main aim of this book is to answer the fundamental question: “What is science and what is its importance in our life?”

Starting from the first pages, you will realise that this textbook is completely different from any other usual textbook full of theoretical passages and formulas. Every chapter contains useful information, curious facts, tasks for individual and group work. You will also learn how to conduct research and experiments yourselves, search for information, make your own discoveries.

One more valuable feature of this textbook is the language. Every sentence has been carefully chosen so that it is not difficult for you to understand science in the English language. Each page contains translations of all the important terms, both in Kazakh and Russian. This textbook will not only help you improve your English, but it will also make you a part of a big international science community.

Please pay attention to the structure of this textbook. Remember: a textbook is no longer the only source of information in the modern world. With the help of carefully selected tasks, you are going to learn such important skills as critical thinking, problem solving, information analysis, creativity, imagination, teamwork, digital literacy etc.

If you have any questions, suggestions or ideas regarding the contents of this book, please feel free to contact us:

via email: admin@astanakitap.kz

via telegram app: @astanakitap

Best regards,

team of authors, “Астана-кітап”

CHAPTER 1. COMPUTER LITERACY

1.1 NEGATIVE EFFECTS OF USING A COMPUTER FOR A LONG TIME

You will:

Определение рисков, связанных с использованием электронных устройств в течение длительного времени.

How long do you spend using computer per day?

Это правда, что компьютеры полезны в нашей жизни. Современная эпоха требует от всех, чтобы каждый имел профессиональные и технические навыки. Существует множество задач, которые невозможно выполнить без использования компьютера. Однако есть и отрицательные стороны использования компьютеров. В этом уроке вы узнаете несколько советов о том, как уменьшить негативные реакции электронных устройств.

Проблема головной боли:

В настоящее время каждый третий человек страдает головной болью. Однако никто не пытается понять причину этого. Замечали ли вы, сколько часов вы обычно проводите перед компьютером или экраном смартфона? Подумайте об этом. Использование компьютера в течение длительного времени влияет на мозг человека и вызывает головную боль.

Поза:

Сидя перед компьютером без движений в течение длительного времени негативно влияет на наш организм. Это может также вызвать боли в позвоночнике, руках и ногах. Чрезмерное использование компьютера также становится причиной болей в теле. Это может быть опасно для вас, поскольку боль в теле является серьезной проблемой. Поэтому постарайтесь не проводить за компьютером очень длительное время.

Причины морщин на лице:

Использование компьютера в течение длительного времени влияет на внешний вид тела и красоту лица. Чрезмерное использование может вызвать морщины на лице.

Темные круги:

Непрерывное использование компьютера в течение долгих часов становится причиной темных кругов вокруг глаз. Тепло компьютера влияет на кровообращение, что может вызвать серьезные проблемы со здоровьем.

Correct and Incorrect postures:

Ways to Reduce the Negative Effects of Computers:

- If you are going to use a computer longer than an hour, you should have an LCD monitor. They do not put out radiation, and such a bright glare.

- Do not stare hard at the screen. Look away from the screen every ten to fifteen minutes. Keeping your eyes on one spot is not good.

- Use eye drops in your eyes. If your eyes are sensitive you may want to put eye drops in every hour.

- Keep at least 60 centimeters away from the monitor. This allows space between your face and your monitor.

- Try to stand up at least once an hour. Your legs will start to hurt if you keep sitting for a long time. If you sit all day your muscles will atrophy over time.

- You can always try wearing monitor glare prevention glasses (Anti-Reflective Coating) which help. They are mainly used by gamers.

Activity

According to the lesson materials make a poster that will contain most of the advices and negative aspects of using electronic devices.

Literacy

1. С какими рисками вы сталкиваетесь во время использования компьютера?

2. Как оставаться здоровым даже при долгом использовании компьютера?

3. Почему люди используют компьютеры в течение длительного времени?

Terminology

headache - бас ауруы - головная боль

spine - омыртқа - позвоночник

excessive - шектен тыс - излишний

blood circulation - қан айналымы - циркуляция крови

body appearance - дене келбеті - внешний вид

wrinkle - əжім - морщина

harm - зиян - вред

spot - орын - место

advice - кеңес - совет

1.2 INFORMATION PROPERTIES

You will:

Определить значение информации;

Определение свойств информации.

Through which body part do you receive more information?

Properties of information

В повседневной жизни экономическое развитие общества, жизни и здоровья людей зависит от свойств информации. В любой стране требуется проанализировать свойства информации, чтобы оценить, является ли она понятной, актуальной и полезной для других, и насколько достоверна содержащаяся в ней информация.

Relevance

- Важность информации для человека или общества

- Польза в конкретной ситуации для решения проблемы

- Только уместная, своевременно полученная информация может быть полезной

Почему прогноз погоды уведомляется за день / за несколько дней заранее?

Availability

- Понятная форма и язык для получателей.

- Одинаковая информация может быть представлена в различных формах.

- Информация становится ясной и годной, если она отображается в понятной форме и на доступном языке.

Reliability

Достоверность информации о том, насколько это правильно и реально. Неверная информация может привести к неправильному применению.

Completeness

Это очень важно иметь полную и точную информацию. Представьте, что вы разговариваете по телефону и не можете правильно услышать своего друга из-за постороннего шума. В таком случае вы не получите полную информацию.

Authenticity of information content on the internet

In recent years, the Internet has become the most popular source of information. This is quite natural since the search for data on the Web is comfortable, easy and quick.

Can I trust the information that is published on the Internet?

Trusting everything that is written on the Web would be too stupid and naive, because the Internet is an area of free access, and absolutely everyone can take part in its filing. So what should you do?

- Search for a fact! What is the source of this information? Is it from authoritative sources?

- Search the same information on the other sites. If the information is published in several independent websites it is correct. Be careful and also look for their original sources. Often several websites can take wrong information from one source.

- Check for rating and authority of a website. You can also simply enter the name of the resource in any search engine and read reviews about it.

- Search for information about the status and competence of its author, with his other works, comments and feedback from readers.

Fact

Data and Information

Data is raw facts which do not have any meaning. Data can be something simple and useless until it is processed.

When data is processed, organized, structured or presented in a given context so as to make it useful, it is called information.

Activity 1

“Broken phone”

1. Divide into groups. Members of each group must stay behind each other.

2. Teacher whispers a phrase to group leaders so that other members could not hear it.

3. Players keep whispering quietly to one another till the last member hears the phrase.

4. Finally, the last player shouts loudly about what he has heard.

5. The winner is a team whose final phrase is mostly similar to the given word.

Activity 2

“Crocodile” game

1. The student explains the word to the class using only gestures, while others try to guess the word.

2. If anyone finds the word, he/she will replace the current student and explains the next word.

3. Discuss the property of information such as availability.

Practice

Найдите информацию про искусственный интеллект и сделайте небольшую презентацию. Затем оцените свою информацию в соответствии со следующими рубриками:

Literacy

1. Осмотритесь вокруг и дайте примеры для данных. Как вы можете преобразовать их в информацию?

2. Обсудите, какое свойство информации является для вас наиболее важным. Почему?

3. Как неправильная информация может повлиять на вашу жизнь?

4. Каким мог бы быть мир, если бы все говорили достоверную и полную информацию?

5. Дайте информацию о вашем друге, используя все свойства информаций.

Terminology

processed - өңделген - обработанный

context - контекст - контекст

relevant - өзекті - актуальный

properties - қасиеттері - свойства

suitable - жарамды - подходящий

particular - нақтылы - конкретный

whisper - сыбырлау - шептать

gesture - ишарат - жест

guess - табу - угадывать

naive - аңқау - наивный

1.3 COLLABORATIVE WORK

You will:

Определить электронные онлайн-услуги для совместной работы;

Совместное использование и создание документа для работы в группах.

Many heads are better than one.

Collaborative work

Иногда, работая в группах, мы должны делиться онлайн-документами по почте или в социальных сетях. Это занимает много времени, чтобы просто изменять и передавать документы друг другу. Тем не менее, есть хорошее решение для этой проблемы. В настоящее время мы можем использовать Google Drive для работы в команде. Это дает возможность работать над одним документом вместе в одно время.

Пользователи могут просматривать, комментировать или даже вносить изменения в онлайн-документы.

If you do not have an account

1. Откройте веб-браузер и перейдите на сайт www.gmail.com.

2. Нажмите «Создать учетную запись».

3. Следуйте инструкциям, заполните необходимую информацию.

4. Если вы правильно заполнили форму, вы увидите страницу приветствия Google. Теперь вы можете использовать некоторые веб-функции Google.

Google drive

Google Диск представляет собой облачный сервис хранения данных, которое также включает в себя инструменты Google для офиса. Вот некоторые преимущества Google Диска:

Стоимость - Google Диск бесплатный 15 ГБ общей памяти.

Коллаборация. Вы можете легко предоставить другим членам доступ к вашим файлам.

Доступ. Вы можете получить доступ к своим файлам с любого компьютера, используя любую ОС. Все, что вам нужно - это доступ в Интернет. Просто войдите в свою учетную запись Google.

Importing Files

1. Метод перетаскивания

Чтобы импортировать поддерживаемый файл с рабочего стола нажмите на файл и перетащите его на свой Google Диск.

2. Загрузка напрямую на Google Диск

Если файл, который вы хотите загрузить не находится на рабочем столе, вы можете также импортировать непосредственно из окна Google Drive.

Нажмите кнопку «Создать» на своем Google Диске. Появится раскрывающееся меню.

Sharing a document

Чтобы изменить настройки, нажмите кнопку «Поделиться». Появится «Поделиться с другими».

Введите имена людей из списка контактов или адреса электронной почты людей, с которыми вы хотите поделиться документом.

Выберите свойство совместного использования.

Practice

Group work.

1. Create a folder in Google Drive and share access with others in the group.

2. Each team member should fill that document with information about himself.

Literacy

1. Why is it important to work together with the team?

2. Describe the method of working on one document with your team?

3. How to share an online document with people?

4. What kind of online service do you know that gives opportunities to work together with your team in a live time? (Except google)

Terminology

collaborative – бірлесу – сотрудничать

share – бөлісу - делиться

opportunity – мүмкіндік – возможность

required – қажетті – обязательный

features – мүмкіндіктер - особенности

cloud-based – бұлтқа негізделген - облачный

cost – құны – стоимость

access – қолжетімділік – доступ

drag and drop – жылжыту – перетаскивание

support - қолдау көрсету - поддерживать

1.4 NETIQUETTE

You will:

Научиться, как вести себя при общении в Интернете.

Do unto others as you would have others do unto you

Netiquette

«Сетевой этикет» - это правила поведения во время общения в Интернете.

Знание «сетевого этикета» очень важно, поскольку в настоящее время очень много людей общаются в Интернете. Когда вы сразу отвечаете на электронную почту или сообщение, вы не всегда думаете о том, как ваши ответы будут приняты вашим другом.

Были случаи, когда аргументы в Интернете начинались с небольшого простого недоразумения, которого можно было бы легко избежать. Если не решить сразу, то аргумент может возрасти и вызвать словесные атаки.

В этом уроке вы будете изучать правила надлежащего этикета. Вот некоторые основные правила сетевого этикета, которые вы должны знать и следовать:

Basic rules of Netiquette:

Rule #1: Capital letters

Никогда не пишите все в заглавных буквах. В Интернете это означает «крик» и грубый тон. Кроме того, если вы когда-либо пробовали прочитать документ написанный весь в заглавных буквах, вы знаете, как это может напрягать глаза.

Rule #2: Message title

Всегда указывайте заголовок, когда вы отправляете свои почтовые сообщения. Если исходным заголовком сообщения был «Домашнее задание на казахском языке», убедитесь, что в вашем ответе указано «Re: Домашнее задание на казахском языке» или содержит «Домашнее задание на казахском языке» в качестве ссылки. Таким образом, получатель вашего сообщения будет знать, о чем пойдет речь.

Старайтесь писать сообщения короткими и четкими.

Rule #3: Read before

Не начинайте обсуждать сразу, для начала прочитайте предыдущие сообщения перед отправкой.

Rule #4: Answers

Отвечайте на индивидуальные запросы лично и отправляйте соответствующие ответы всеобщего интереса в публичной форме.

Rule #5: Online vs Face-to-face

Не пишите ничего такого, что вы не скажете кому-то такое в лицо. Если вы грубы или, если ваши слова кажутся грубыми, вы можете начать «пламенную войну», в которой в конечном итоге заставите пылать самого себя.

Rule #6: Reference

Если вы отвечаете на предыдущую запись, всегда указывайте или ссылайтесь на часть, на которую вы отвечаете. Ссылка приветствуется, особенно если с полным и точным ответом вы задерживаетесь.

Rule #7: Full answer

Если у вас нечего написать кроме, как «я тоже», то не отвечайте вообще. Старайтесь писать полные и законченные предложения, и выражать их ясно.

Rule #8: Privacy control

Контролируйте свою речь и лексику. Электронная почта не безопасна и когда-нибудь, вы можете узнать, что сообщения, которые Вы отправили одному получателю, даже в уверенности, были отправлены незнакомцам.

Rule #9: Smileys

Помните, никто не видит вас и не слышит ваш тон голоса. Если вы не знаете, как будут отображаться ваши сообщения, добавьте символы для выражения чувств или «смайлик». Например, вот «подмигивающий смайлик.» используется в такие моменты, когда вы делаете комментарий и надеетесь, что получатель не будет воспринимать все слишком серьезно.

Practice 1

Use emoji smileys above inside this text:

I am filled with sadness and sorrow in my heart as I write this letter. I am really sorry for letting you down on. I know I promised to be there and spent time with you as we have always been doing for the past holidays.

Practice 2

Guess the Kazakh proverbs below:

Practice 3

Write down the 5 Kazakh proverbs using smileys, as shown in practice 2.

Literacy

1. What are the main criteria for communicating online?

2. What is the meaning of netiquette?

3. What is the difference between communication online and live?

4. In which situation we should use emoji symbols?

5. Which of the netiquette rules come strange for you? And why?

Terminology

communicate – қарым-қатынас жасау – общаться

immediately – дереу – немедленно

response – жауап – ответ

misunderstanding – түсінбеушілік - недоразумение

avoid – болдырмау – избежать

verbal attack – ауызша шабуыл – словесная атака

recipient – алушы – получатель

rude – дөрекі – грубый

1.5 COMPUTER CONFIGURATION

You will:

Уметь выбирать оборудование в соответствии с конкретными требованиями.

How can I assemble a powerful computer?

Before assembling, answer the following questions:

1. Для чего он будет использоваться?

2. Какие компоненты я хочу подключить?

3. Сколько денег мне нужно потратить?

Компьютеры можно разделить на несколько групп, в зависимости от их функциональности: дома, в офисе или для игр. Например, для офисного компьютера необходимо иметь принтер, для игрового компьютера он должен иметь мощный процессор, более быструю ОЗУ, высококачественную видеокарту и хороший монитор.

Также важна совместимость устройств с материнской платой. Существуют специальные интерфейсы (сокеты), которые служат для подключения материнской платы с процессором. Есть несколько различных интерфейсов для различных моделей материнских плат. Например, процессоры Intel совместимы с интерфейсами Socket 1150, тогда как процессоры AMD используют Socket AM3, Socket FM2 и Socket S-AM2.

Past, present and future of technology and devices:

Typewriter

Laptop

Touchscreen desktop

5 things to consider when buying a computer:

CPU

Прежде всего, мы должны выбрать процессор, потому что он выполняет все операции на компьютере. Вы выбираете свой собственный процессор в соответствии с вашими финансовыми возможностями, личными предпочтениями и задачами.

CPU performance:

Для офиса - 1800-2200 MHz

Для работы с 3D-графикой/видео - 2800-3200 MHz.

Video card

Существуют 4 типа видеокарт: Integrated, PCI, AGP, PCI Express.

RAM

ОЗУ (оперативное запоминающее устройство) является местом, где текущие программы временно сохраняется. Скорость выполнения текущих операций зависит от объема оперативной памяти. Данные остаются в ОЗУ во время работы компьютера. Когда компьютер выключен, ОЗУ теряет свои данные.

HDD (Hard Disk Drive) or SSD (Solid State Drive)

Все файлы и папки физически расположены на жестком диске. Данные хранятся на жестком диске постоянно, поэтому они остаются там, даже если компьютер выключен.

Motherboard

При выборе материнской платы необходимо обратить внимание на процессор сопряжения (сокет). Процессор и материнская плата должны быть совместимы друг с другом.

Practice

Surf the internet and find suitable hardware for gaming PC.

Activity

All in one PC, Laptop or Desktop computer.

Discuss in groups the most suitable computer type for school, office, home, and self-usage.

Literacy

1. How to choose hardware according to specific requirements?

2. Compare types of hard drives (HDD or SSD) and define which one is better?

Terminology

specific requirements – арнайы талаптар – особые требования

assemble – жинау – собирать

compatible – үйлесімді – совместимый

manufacturer – өндіруші – производитель

temporarily – уақытша – временно

permanently – тұрақты – постоянно

suitable – қолайлы – подходящий

1.6 SELECTING SOFTWARE

You will:

Научитесь выбрать правильное программное обеспечение в соответствии с техническими характеристиками компьютера.

How to choose the right software?

Software system requirements

Каждый год разработчики программного обеспечения выпускают более современные программы, которые получают не только новый интерфейс, но и некоторые полезные и интересные функции. Пользователи, вдохновленные новыми функциями, спешат приобрести новую версию и установить ее на свой компьютер, даже не заглядывая в раздел системных требований. В результате программное обеспечение работает с тормозами и сбоями.

Итак, как выбирать программное обеспечение, чтобы его использование не влияло на скорость вашего компьютера?

Step #1: Analyze your need

Не выбирайте приложение, чтобы иметь что-то новое, выяснить, что вам нужно от инструмента, а затем исследовать приложение, соответствующее этим требованиям.

Step #2: Specifications

Вам нужно знать, какие ресурсы у вас есть.

1. Откройте меню: Пуск → Выполнить

2. Введите команду DXDIAG и нажмите OK. (Figure 1)

3. Появится окно «Диагностический инструмент DirectX», в котором вы сможете узнать всю информацию о своем персональном компьютере. Запишите или запомните следующие данные:

- операционная система;

- ЦПУ и память (ОЗУ);

- видеокарты (Screen - Name);

- версия DirectX.

Step #3: System Requirements

На этом этапе мы узнаем о системных требованиях установленного ПО. Для этого откройте: Пуск → Панель управления → Программы → Программы и функции

Вы можете увидеть все программы, которые установлены на ПК. Отыщите утилиты, скорость работы которых вас не удовлетворяет, и переходите на официальный сайт разработчиков, где можно отыскать минимальные и рекомендуемые системные требования к компьютеру. Не подходят? Тогда смело удаляем программу и продолжаем зачистку.

Step #4: Alternative software

В наши дни очень сложно встретить программное обеспечение, которое не имеет аналогов. Как правило, к таким утилитам относятся узкоспециализированное ПО, предназначенное для бухгалтерских расчетов, чертежей и других проектов. Остальные же программы можно с легкостью заменить аналогами.

В настоящее время существует более сотни тысяч различных программ, но в поле зрения всегда самые популярные и продвинутые. Не каждый пользователь компьютера знает, что такие программы, как Adobe Reader, Skype, Microsoft Office и другие, могут быть заменены альтернативными программами. Например, Adobe Photoshop CS5 - мощный графический редактор, который требует высокой производительности компьютера, но большинство пользователей даже не используют половину функций утилиты. В таких случаях вы можете использовать бесплатный и простой аналог GIMP.

Вы можете использовать такие сервисы, как «SuggestUse», где достаточно ввести имя вашей программы, чтобы служба выдавала внушительный список альтернатив. Вам нужно будет ознакомиться с системными требованиями и функциональностью программного обеспечения, чтобы понять: подходит ли ПО для ваших задач и целей или нет?

Keep in mind

Все игры и программы, выпущенные в 2018 году, могут не работать на компьютере, купленном в 2013 году, так как системные требования постоянно растут.

Practice

Find an alternative open source programs to:

1. Microsoft office

2. Antivirus Kaspersky

3. Promo Dj

4. Sony Vegas Pro

Literacy

1. Why do you need to care your computer specification when selecting software?

2. What is the difference between system software and application software?

3. Is it possible to install Windows application on Linux operating system?

4. What is advantages and disadvantages of using open source software?

Terminology

impressive – əсерлі - впечатляющий

inspired – шабыттану - вдохновенный

unsuitable – жарамсыз - неподходящий

performance – өнімділік - производительность

system requirements - жүйелік талаптар - системные требования

expect – күту - ожидать

steadily - тұрақты түрде - постоянно

release – шығарылым - выпуск

purchase - сатып алу - покупка

familiarize – танысу - ознакомиться

features – мүмкіндіктер - функции

1.7 CALCULATING THE PRICE OF THE COMPUTER

You will:

научитесь вычислять цену компьютера в соответствии с его частями;

получите информацию о том, как собрать базовый настольный ПК.

Which factors affect the computers price?

Project description

Ваша школа была лучшей в этом году и выиграла очень большую сумму денег. Администрация школы решила обновить все компьютера в школе. Они не осведомлены с типами компьютеров и просят вас, как лучший студент в области ИТ, помочь им.

Your job

Вы должны подготовить 3 типа компьютера и дать расчет цен администрации школы.

1. Компьютеры для администрации.

2. Компьютеры для информатики.

3. Компьютеры для мультимедийного использования.

Instruction

1. Опишите использование каждого компьютера

2. Соберите компьютеры в соответствии с их производительностью и использованием. Пример: компьютеру для мультимедиа не нужна высокая скорость и память, достаточно 4 ГБ ОЗУ, 250 HDD, мощность процессора 2.0 ГГц.

3. Искать цены на каждое устройство на компьютере и рассчитать примерно цену компьютера.

4. Заполните отчет.

Steps to assemble a desktop PC

1. Prepare the Mainboard (motherboard).

2. Mount the CPU in the socket of the Mainboard.

3. Connect the CPU cooler to the Mainboard.

4. Attach the RAM(memory) modules in the corresponding slots.

5. Open the case and mount the power supply which is M-ATX type.

6. Attach the Mainboard back plate to the case and check the Mainboard mounting positions.

7. Suitably position the Mainboard in the case.

8. Mount the Hard disk and connect it to the power supply and the motherboard.

9. Connect the SATA connectors to the drives and the USB connectors and the case switches to the motherboard.

10. Connect the 20 or 24 pin ATX connector and the 4-pin power supply control connector to the motherboard.

11. Mount the DVD-ROM drive.

12. Finally, select a compatible operating system, and follow the instructions to install.

Fact

Статическое электричество является самой большой опасностью для дорогих деталей, которые вы собираетесь собирать. Даже крошечный шок, который слишком мал для вас, может повредить или разрушить тонкие электронные следы, во много раз меньшие, чем человеческие волосы, которые составляют ваш процессор, оперативную память и другие чипы. Для предотвращения повреждения этих компонентов важно использовать антистатический браслет. Также полезно иметь антистатический мат для установки корпуса и других компонентов.

Literacy

1. Which fractures affect to computer price?

2. What kind of advices would you give to your friend when he wants to buy a new computer?

3. Which way would be most productive for you? To buy ready assembled computer or assemble it yourself?

Terminology

assemble - жинау - собирать

performance - өнімділік - производительность

approximately - шамамен - примерно

prevent - алдын алу - предотвращать

corresponding - сəйкес - соответствующий

suitably - тиісті түрде - подходяще

compatible - үйлесімді - совместимый

CHECK YOURSELF

1. What should be the distance between you and monitor?

2. What are the risks of using computer for a long time?

3. Describe the following picture. What is the difference between data and information?

4. Match following terms and definitions

- Relevance Correct and real information

- Availability Full and exact information

- Reliability Important at particular time and situation

- Completeness Clear and understandable form

5. Write 5 concrete examples about what have you learnt in the 1st term. Pay attention that your answer will contain properties discussed in 1.2 chapter.

6. There are 4 main 21st century skills:

- communication, collaboration, creativity, and critical thinking. Why collaboration is an important skill. Write your opinion in 3-5 sentences.

7. Describe step by step how to upload music to Google Disk and share it with several friends by using their Email addresses.

8. Which one is NOT type of a computer?

A) Desktop computer

B) Laptop

C) Tablet

D) Monobook

9. Software divides into ________.

A) Operating System, Utilities, Applications

B) Operating System, Programs, Applications

C) Main, Operating System, Programs

D) Main, Programs, Games

10. Which one is NOT type of OS?

A) Mac OS

B) Linux

C) Windows

D) McAfee

11. Write the names of the following hardware components

12. Is it possible to use only Open Source software at school, at home and offices?

13. How to get information about computer specification?

14. Which factors are more important when calculating the price of the computer?

15. Arrange correctly steps to assemble a desctop PC

__Mount the Hard disk and connect it to the power supply and the motherboard.

__Connect the 20 or 24 pin ATX connector and the 4-pin power supply control connector to the motherboard.

__Connect the CPU cooler to the Mainboard.

__Attach the RAM(memory) modules in the corresponding slots.

__Select a compatible operating system, and follow the instructions to install.

__Open the case and mount the power supply which is M-ATX type.

__Prepare the Mainboard (motherboard).

__Mount the CPU in the socket of the Mainboard.

__Suitably position the Mainboard in the case.

__Connect the SATA connectors to the drives and the USB connectors and the case switches to the motherboard.

__Attach the Mainboard backplate to the case and check the Mainboard mounting positions.

__Mount the DVD-ROM drive.

CHAPTER 2. DATABASE BASICS

2.1 WHAT IS A DATABASE?

You will:

Explain the meaning of a database;

Explain the purpose of using databases;

Identify the database components.

How does the librarian know if a book that you want exists or not in the library?

Database

База данных представляет собой организованную совокупность данных. Мы можем создать базу данных книг для того, чтобы решить проблему с поиском книги. Также можем классифицировать все книги в соответствии с жанром, годом публикации и автором. Такие классификации могут быть сделаны путем создания базы данных. База данных состоит из полей и записей.

Запись - это информация об определенном элементе.

Поле - столбец, в котором хранятся одинаковые типы информации

Example of records and fields in a database

Activity

Draw your own vision of the database of your class on a sheet of paper. You need to think about what kind of information must be in your database. Make 10 fields at least that may be ‘name’, ‘surname’, ‘birthday’, etc.

Example of database in organized table

Database management system

Раньше люди использовали журналы или тетради для ведения и хранения данных, но сегодня такая работа осуществляется с помощью компьютеров. Компьютеры требуют более быстрый доступ и защиту, поэтому программисты разработали СУБД (систему управления базами данных) - программу для управления и защиты данных.

Examples of DBMS: Access, Oracle, PostgreSQL, MySQL etc.

Используя эти программы, мы можем:

- добавлять новые записи и поля;

- поиск по критериям;

- удалять записи.

Database components

Database system consists of 3 parts:

1. Table: The best way to keep all recordings in a database is to use tables. A table has rows and columns. Types of data will be stored in columns (fields) whereas recordings about each item will be stored in rows (records).

2. Query: Used for making operations within a database. Query is a some kind of functions that can be applied to data in a database. There are examples of queries like: find, sort, filter, different types of calculations and so on.

3. Report: By using a DBMS it is possible to show all your requested information in a specific report document. So after you filter the required information and make calculations using queries you can show the results in one report.

Literacy

1. How did people store information before database?

2. How they made such operations like searching, storing and managing information?

3. Where database used in daily life?

Terminology

database – деректер қоры – база данных

field – алаң – поле

record – жазба – запись

column – баған – столбец

row – жол - строка

access – қол жеткізу – доступ

protection – қорғау – защита

table – кесте – таблица

query – сұраныс – запрос

report – баяндама – отчет

2.2 DESIGNING A DATABASE

You will:

Design a database;

Identify data types.

What is the best way to keep information about books at a library?

Design a database

Таблицы являются основным пунктом в базе данных, поэтому вы должны потратить некоторое время на планирование и организацию своих таблиц.

Прежде чем приступать к разработке таблицы, вы должны решить:

- Какие аспекты и события нужно занести и обработать? Ответ на этот вопрос определяет содержимое таблицы и имя таблицы.

- Какие поля вам нужны для организации подобных значений и данных? Ответ на этот вопрос определяет имя полей.

- Какой тип данных вы будете хранить в этих полях? Ответ на этот вопрос определяет типы полей.

Database data types

Текст - Представляет собой группу символов, таких как имена, фамилии и адреса.

Числа - Примерами типа чисел являются возраст, количество и вес.

Дата / время - Используется для хранения даты или времени. Примерами этого типа данных являются дата выпуска и дата рождения.

Валюта - Используется для представления валютной (денежной) стоимости. Например, цена продажи и сумма кредита.

Гиперссылки - Вы можете предоставить ссылку из вашего документа в файл на своем компьютере или на веб-страницу в Интернете.

Keep in mind

A database system is a computer program for managing electronic databases. A very simple example of a database system would be an electronic address book.

Activity 1

Давайте создадим базу данных для библиотеки, которая будет хранить информацию о каждой книге.

1. Прежде всего возьмите лист бумаги и попробуйте спланировать поля для своей новой таблицы.

2. Запишите следующие поля на бумаге: ID, название книги, автор, жанр, дата публикации, количество, популярность.

3. Теперь попробуйте определить, какие типы полей необходимы для полей, которые вы написали.

Activity 2

Choose one of the options below and try to make a database design. Discuss database designs with your classmates. Think about what fields can be used.

1. Student registration form

2. Computer Lab inventory

3. Music and movie store

4. Social network users’ database

Make at least 10 fields with different data types and apply them into your database.

Uses for database systems include:

- They store data

- They store special information used to manage the data. This information is called metadata and it is not shown to all the people looking at the data.

- They can solve cases where many users want to access (and possibly change) the same entries of data.

- They manage access rights (who is allowed to see the data, who can change it)

- When there are many users asking questions to the database, the questions must be answered faster. So, the last person to ask a question can get an answer in a reasonable time.

- Certain attributes are more important than others, they can be used to find other data. This is called indexing. An index contains all the important data and can be used to find the other data.

- They ensure that the data always has context (makes sense). There are a lot of different rules that can be added to tell the database system if the data makes sense. One of the rules might say November has 30 days. This means if someone wants to enter November 31 as a date, this change will be rejected.

Fact

A database administrator could...

Design a digital database of medical records that can be instantly transferred between clinics, unlike paper patient records.

Protect bank accounts from hackers by adding security features to a bank’s financial database.

Make an inventory database for a chain of candy stores to help them keep the most popular candies in stock.

Create a database of DNA from people with multiple sclerosis to help researchers pinpoint the genes involved in the disease.

Literacy

1. How do we build a new database?

2. Where do we use a table in daily life?

Terminology

immediate - тез арада - немедленный

to-do list - жұмыстар тізімі - список дел

to combine - біріктіру - объединить

to resize - өлшемін өзгерту - изменить размер

to scroll - айналдыру - прокручивать

field - алаң - поле

edge - шеті - край

area - аудан - область

to break - бөлу - разделить

to customize - баптау - настроить

2.3 BUILDING A DATABASE

You will:

Create forms;

Create tables.

How to build a database system to find books in the library faster?

Creating form

Для того, чтобы начать создавать базу данных, необходимо создать форму, которая добавит новую информацию о книгах в нашу библиотеку.

- Откройте Google диск

- Нажмите «Создать» и выберите «Google Forms»

- Нажмите «Новая форма» и введите имя новой формы. Например: «Добавить новую книгу»

- Нажмите «Вопрос без заголовка», чтобы ввести вопрос. Пример: «Название книги».

- Выберите тип ответа для своего вопроса. Пример: «Короткий ответ».

- Нажмите «+» справа и добавьте новые вопросы:

«Жанр» с типом «Раскрывающийся список»

«Опубликованные данные» с типом «Дата»

«Количество» с типом «Текст(строка)»

Ставка «Популярность» с типом «Шкала»

- Now fill in the database with 10 books at least. Click “Preview view” to fill in the form by yourself.

Share and responses

Использование Google форм поможет вам подготовить опросы и поделиться с другими. Чтобы поделиться формой, вы можете отправить ее другим пользователям по электронной почте или предоставить ссылку на свою форму.

- Click “RESPONSES” and see the recordings you have;

Click “Create spreadsheet”. This operation creates a new Google sheets table with your Google-form data recordings.

Keep in mind

You can format your form style in the theme options menu, such as header image, theme color, background color, and font style.

Keep in mind

1. You can send your form via email;

2. You can copy and send a link;

3. You can share your form via social networks (Facebook, Google+, Twitter).

Literacy

1. How can we make a new Form?

2. What kind of Google features do you use/know?

3. Share your experience with classmates.

Terminology

form – форма – форма

drop-down – ашылатын – выпадающее

upload – жүктеу – загрузить

response – жауап – отклик

icon – белгіше – значок

2.4 SORT AND FILTER DATA

You will:

Apply basic sort;

Apply basic filter.

What should we do with the book database to quickly find a book by some criteria?

Sort and filter

In this lesson, we are going to learn how to work with data.

When we have a big amount of data it is difficult to find specific information about a required item. Because of that, we need to use sorting or filtering tools. Previously we have created a database for a library. Now we are going to continue our work with the previous exercise. Use the table that we have created to store all the information about books in our library.

Apply filter

Чтобы применить «Фильтр» выберите заголовки таблицы, перейдите во вкладку «Данные» и выберите команду «Фильтр».

Apply sort features

Для того, чтобы продемонстрировать «Сортировку» давайте отсортируем наши книги по Автору. (Figure 2). Нажмите стрелкой в поле «Автор» и выберите один из двух доступных видов сортировки. Первый тип сортируется в порядке возрастания, тогда как второй по убыванию.

В этом примере мы применили «Фильтр», чтобы показать книги с жанром «Классика». Для отмены «Фильтра» нажмите стрелкой в поле «Фильтр» и нажмите кнопку «Выбрать все». Наконец, нажмите «ОК».

If any Filter was applied the following icon () would appear.

Filter by condition

Теперь мы будем применять фильтры по условиям, используя «Больше» или «Равно»:

Search

If we want to find information about a particular book we can use ‘Search’ tool within the ‘Filter’ method.

Keep in mind

Cell address name Columns and rows have own address names. Columns are represented in letters (A,B,C,D…) and Rows in numbers (1,2,3,4…). Each cell is represented by letters (column) and numbers (row).

For example: a cell in column ‘A’ and row ‘1’ has a name address of ‘A1’ and so on.

Practice 1

1. Apply sorting to “Name of the book” in alphabetical order

2. Apply sorting to “Quantity” to find out what books prevail in your library

Practice 2

1. Apply Filter to “Genre” and find out what genres of books are more popular within your library.

2. Apply Filter to “Author” and look out which authors are more popular in your library.

Practice 3

1. Apply Filter to the books which “Quantity” is greater than 5.

2. Apply Filter to the books which “Popularity rate” is less than 5.

Literacy

1. Why do we use the “Sort” method?

2. What is the difference between “Filter” and “Sort”?

Terminology

criteria - критерия - критерия

required - міндетті - обязательный

sort - сұрыптау - сортировать

according - сəйкесінше - в соответствии

ascending - өсу реті - по возрастанию

descending - кему реті - по убыванию

method - əдісі - метод

filter - сүзгі - фильтр

condition - жағдайы - состояние

2.5 PIVOT TABLE

You will:

Apply pivot tables;

Make reports from a database.

How to present all information from database in attractive view?

Pivot table

It is important how information is presented. At first, we have to define what kind of information we are going to present. To do that we shall prepare some tables that are called “Pivot tables”.

Чтобы применить сводную таблицу, нажмите «сводная таблица ...» во вкладке «Данные».

У вас должна получиться таблица, показанная выше. Теперь рассмотрим каждую из трех опций «сводной таблицы»

1. Предварительный просмотр сводной таблицы. Все параметры, которые вы выберете в следующей части, появятся здесь.

2. Редактор сводной таблицы. Здесь вы можете выбрать элементы, которые вы хотите включить в свою таблицу (строки, столбцы, значения и фильтр)

3. Имя сводной таблицы. Здесь вы можете задать заголовок для таблицы

Pivot table by rows

Now we are going to count amount of the books of different genres:

1. Нажмите «Добавить поле» и выберите «Жанр»

2. Нажмите «Количество» и выберите «Суммировать по»: «SUM».

Finally, you should have a table showing quantity of books in total.

Pivot table by rows and columns

Теперь нам нужно показать количество книг разных жанров и разным рейтингом популярности. Добавьте три поля и выберите «Жанр» для «Строки», «Рейтинг популярности» для «Столбцы» и «Количество» для «Значений».

Finally, you will have a preview of the table shown below.

We can see that we have 3 books with “Classical” genre which popularity rate is 4 and 10 books which popularity rate is 5. Also, the biggest amount of books are in “Other” genre with the popularity rate of 5 that has 100 items in total.

If we want to show information about a particular item, but not a total quantity, we can use “COUNTA” method in Summarize by menu:

Keep in mind

By using “Edit range...” we can change ranges of a table. We must add new records to use this function within a pivot table.

Practice 1

Show information about how many books of different authors are stored in your database.

Practice 2

Now prepare different pivot tables according to the following criteria:

1. How many books from different authors with different genres are stored?

2. How many particular books do you have from different authors with different popularity rates?

Practice 3

1. Apply Filter to the books which “Quantity” is greater than 5.

2. Apply Filter to the books which “Popularity rate” is less than 5.

Literacy

1. In which situations can we use pivot table?

2. What is needed for making reports?

Terminology

pivot - жиынтық кесте - сводная таблица

to consider - қарастыру - рассматривать

record - жазба - запись

quantity - саны - количество

2.6 CHARTS

You will:

Apply charts forpresenting a database information.

What is the best way to present information?

Charts/Graphs

A chart, also called a graph, is a graphical representation of data. Charts have different formats such as bar chart, line chart and a pie chart.

Линейный график

Мы используем линейные графики для просмотра изменений в коротком или длительном периоде времени. Линейные графики являются лучшими при показе небольших изменений.

Круговая диаграмма

Мы используем круговые диаграммы для сравнения частей целого элемента.

Гистограмма.

Мы используем гистограммы, чтобы сравнивать вещи между различными группами и просматривать изменения по течению времени. Гистограммы лучше всего показывают большие изменения.

The best way for presenting your information is to prepare graphs. Previously we have made pivot tables which main purpose was to filter information. Now we are going to learn how to make graphs from pivot tables.

The table in Figure 5 shows how many books are in our database without showing total amount of books.

To insert a chart choose “Insert” » “Chart” option. You can change “Chart type” to “Pie chart“ from “Setup” menu in “Chart editor”.

Activity

Analyze the charts below and discuss with your classmates the information that they give.

Practice

Apply charts for different pivot tables from the previous lesson.

Literacy

1. How to make charts in Google Sheets?

2. Discuss for which databases each chart type can be applied?

Terminology

representation - көрсету - представление

chart - диаграмма - диаграмма

purpose - мақсаты - цель

insert - кірістіру - вставить

recommendation - ұсыныс - рекомендация

2.7 MINI PROJECT: FAMILY SHOP

You will:

Create a database that will help to count goods in a shop;

Get information about Database types.

Would you like to help your family to arrange goods in your family shop?

Family shop database

В этом уроке мы будем разрабатывать небольшую базу данных, которая поможет нам подсчитать товар в магазине. Сначала сделаем форму для ввода данных в нашу базу данных.

Создайте форму с названием: «Our shop». Add 5 fields with the following types:

1. Name of the product - Short answer;

2. Category of product - Dropdown (at least 4 categories);

3. Quantity - Short answer;

4. Price - Short answer;

5. Expire date - Date.

Practice 1

Заполните форму как минимум с 5 записями.

Practice 2

1. Now start working with the database table. Apply “sorting” of all goods according to ‘Price’ in descending order.

2. Filter all goods according to any two categories.

3. Add a pivot table to show all the records according to some types. For example: Show goods quantity in different categories

4. Finally, create a chart to represent information details.

Types of Database

Centralized database - Users from different locations can access this database from a remote location at the central database, that store entire information and application programs at a central computing facility for processing.

Operational database - This is more of a basic form of data that contain information relating to the operations of an enterprise.

End-user database - End user is the user of software, application or a product. This is a shared database which is shared by users and is meant for use by the end users, just like managers at different levels.

Commercial database - This is a database that contains information which external users may require. However, they will not be able to afford to maintain such huge database by themselves.

Personal database - The personal databases are maintained, generally, on personal computers. They contain information that is meant for use only among a limited number of users, generally working in the same department.

Distributed database - These databases have contributions from the common databases as well as the data captured from the local operations.

Fact

A database management system (DBMS) is a computer software application that interacts with end users, other applications, and the database itself to capture and analyze data. A general purpose DBMS allows the definition, creation, querying, update, and administration of databases.

Fact

Your responsibility as a database administrator (DBA) will be the performance, integrity, and security of a database. You’ll be involved in the planning and development of the database, as well as in troubleshooting any issues on behalf of the users.

You’ll ensure that:

- data remains consistent across the database;

- data is clearly defined;

- users access data concurrently, in a form that suits their needs;

- there is provision for data security and recovery control (ensuring all data is retrievable in an emergency).

Terminology

performance - өнімділік - представление

integrity - тұтастық - целостность

security - қауіпсіздік - безопасность

troubleshoot - ақаулықтарды жою - устранение неполадок

enterprise - кəсіпорын - предприятие

CHECK YOURSELF

1. Where can we use databases? (Give at least 3 examples)

2. Which parts does a database system consist from?

3. Describe the steps of planning a database

4. What data types do we have in Google Sheets?

5. What are the ways of creating a form?

6. How to apply a filter to table?

7. What is pivot table?

8. Describe the way of creating a spreadsheet table by using Form.

9. Describe functions of filter in Google sheet.

10. Describe way to apply pivot table.

11. Give 3 examples of where you can use Google Forms

12. Describe types of charts

13. Describe way to apply chart to your table.

CHAPTER 3. PROGRAMMING

3.1 PYTHON LIST

You will:

Create python list and use;

Learn to change list items.

How can you create a program that will store your classmates’ names?

Список в Python

На этом уроке раскрываются подробности работы со списками: удаление и добавление элементов, методы списков.

Что такое список (list) в Python?

Список (list) – это структура данных для хранения объектов различных типов. В нем можно хранить объекты различных типов. Размер списка не статичен, его можно изменять. писок по своей природе является изменяемым типом данных.

Список представляет собой последовательность значений в квадратных скобках ([ ]). Значения списка называются элементами и разделяются запятыми.

>>> [value, value, ...]

Example 1

>>> data = [“This”, “list”, “has”, 4, “elements”]

>>> print (data)

This list has 4 elements

>>> numbers = [5, 3, 12, 4, 9, 12]

>>> print(numbers)

5 3 12 4 9 12

List Indexes

Each element in a list is accessed by an index. List indices start at 0.

An element can be accessed by an index using the following command:

list[index]

Example 2

>>> Fruits = [“apple”, “banana” , “orange”]

>>> print ( Fruits[0] )

>>> print ( Fruits[1] )

>>> print ( Fruits[2] )

apple banana orange

Keep in mind

Arrays and lists are both used in Python to store data, but they are different. The main difference between a list and an array is the functions that you can perform to them. Arrays have to be declared while lists don’t because they are part of Python’s syntax. So lists are used more often.

Practice 1

Print the second item in the fruits list.

fruits = [“apple”, “banana”, “cherry”]

Negative List Indexing

Virtually everything about string indexing works similarly for lists. For example, a negative list index counts from the end of the list:

Example 3

>>> a[-1]

‘corge’

>>> a[-2]

‘quux’

>>> a[-5]

‘bar’

Practice 2

Print the item with second negative index in the fruits list.

fruits = [“apple”, “banana”, “cherry”]

Negative List Indexing

In Python, lists can be modified. For example, you can change the element at a certain index by assigning a new value to it.

list[index] = value

Example 4

>>> Fruits = [“apple”,”banana”,”orange”]

>>> Fruits[0] = “peach”

>>> Fruits[1] = “cherry”

>>> print ( Fruits )

peach cherry orange

Practice 3

Change the value from “apple” to “kiwi”, in the fruits list.

fruits = [“apple”, “banana”, “cherry”]

Practice 4

There is a list of misspelled fruits within a list. Replace each mistake with the correct word.

fruits = [“aple”, “orang”, “bnanan”, “grapy”]

Literacy

1. Think about how to create a list of weekdays.

2. How can we change the start day of the week?

Terminology

index – индекс – индекс

element – элемент – элемент

array – массив – массив

comma – үтір – запятая

value – шама – значение

assign – тағайындау – присваивать

store – сақтау – хранить

3.2 CREATING AND ADDING ELEMENTS TO A LIST

You will:

Create python list and use;

Add and insert elements to the List.

Создание и чтение списков.

Списки в Python можно создать, просто поместив последовательность в квадратные скобки []. Список не нуждается во встроенной функции для создания списка.

Example 1

# Creating a blank List

List = []

print(“Intial blank List: “)

print(List)

Output

Intial blank List:

[]

Добавление элементов в список

Элементы могут быть добавлены в список с помощью встроенной функции append(). Только один элемент за один раз может быть добавлен в список с помощью метода append(), для добавления нескольких элементов с помощью метода append() используются циклы.

Метод append () работает только для добавления элементов в конец списка.

Example 2

# Adding elements to the List

List.append(1)

List.append(2)

List.append(4)

print(“List after Addition of Three elements: “)

print(List)

Output

List after Addition of Three elements:

[1, 2, 4]

There’s one more method for Addition of elements, extend(), this method is used to add multiple elements at the same time at the end of the list.

Example 3

# Adding multiple elements using Extend Method

List.extend([8, ‘Python’, ‘List’])

print(“List after performing Extend Operation: “)

print(List)

Output

List after performing Extend Operation:

[1, 2, 4, 8, ‘Python’, ‘List’]

For addition of element at the desired position, insert() method is used. Unlike append() which takes only one argument, insert() method requires two arguments (position, value).

Keep in mind

append() and extend() methods can only add elements at the end.

Example 4

# Adding element (using Insert Method)

List.insert(3, 12)

List2.insert(0, ‘Python’)

print(“List after performing Insert Operation: “)

print(List)

Output

List after performing Insert Operation:

[‘Python’, 1, 2, 4, 12, 8, ‘Python’, ‘List’]

For addition of multiple elements with the append() method, you can use loops.

Example 5

# Adding elements to the List using Iterator

for i in range(1, 4):

List.append(i)

print(“List after Adding elements from 1-3: “)

print(List)

Output

List after performing Insert Operation:

[‘Python’,1,2,4,12,8,‘Python’,‘List’,1,2,3]

Practice 1

1. Create empty list.

2. Add at least 3 numbers and 2 strings to the list

Practice 2

Insert new item to the list, that you’ve created in Practice1, between first and second items.

Practice 3

1. Create new blank list

2. Add EVEN numbers from 2 to 10 using loop.

Literacy

1. How many methods of adding elements to the list do you know?

2. What is the difference between append(), extend() and insert() methods?

Terminology

insert – кірістіру – вставить

element – элемент – элемент

extend – кеңейту – расширять

even – жұп – четный

odd – тақ – нечетный

3.3 SEARCH ELEMENT IN A LIST

You will:

Methods of searching elements in list;

Do you have any method to find anything fast?

Проверка наличия элемента в списке

Список является важным контейнером в Python, поскольку он хранит элементы всех типов данных в виде коллекции. Сейчас вы познакомитесь с одной из основных операций со списком способов проверить наличие элемента в списке.

Method #1: использование цикла

Этот метод использует цикл, который перебирает все элементы для проверки существования целевого элемента. Это самый простой способ проверить наличие элемента в списке.

Example 1

# Initializing list

my_list = [ 1, 6, 3, 5, 3, 4 ]

print(“Checking if 4 exists in list (using loop):“)

for i in my_list:

if(i == 4) :

print (“Element Exists”)

Output

Checking if 4 exists in list (using loop):

Element Exists

Method #2: using “in”

Python in is the most conventional way to check if an element exists in list or not. This particular way returns True if element exists in list and False if the element does not exist in the list. The list need not be sorted to practice this approach of checking.

Example 2

# Checking if 4 exists in list using in

if (4 in my_list):

print (“Element Exists”)

Output

Checking if 4 exists in list (using in):

Element Exists

Method #3: using set() + in

Converting the list into set and then using “in” can possibly be more efficient than only using “in”. But having efficiency for a plus also has certain negatives. One among them is that the order of list is not preserved, and if you opt to take a new list for it, you would require to use extra space. Another drawback is that set disallows duplication and hence duplicate elements would be removed from the original list.

Example 3

# Initializing list

list_set = [ 1, 6, 3, 5, 3, 4 ]

print(“Checking if 4 exists in list (using set()+in):“)

list_set = set(list_set)

if 4 in list_set :

print (“Element Exists”)

Output

Checking if 4 exists in list (using set()+in):

Element Exists

Practice 1

1. Create and initialize a list;

2. Enter random 10 numbers into the list;

3. Input any number you like;

4. The program should check the number you like exists in the list;

5. Use different methods.

Practice 2

1. Create two lists;

2. Add 5 elements to the first list using append() method;

3. Add 5 elements to the second list using extend() method;

4. The program should check the number you like exists in the list;

5. Check all items and print out elements that exist in both lists.

Hint: use for loop and in method.

Literacy

1. Explain the pros and cons of different ways of checking existence of element in the list.

Terminology

loop – цикл – цикл

element – элемент – элемент

initialize – инициализациялау – инициализировать

conventional – дəстүрлі – обычный

3.4 SWAP ELEMENTS IN LIST

You will:

Learn to swap elements in a list;

How many ways do you know to swap items from two boxes?

Обмен значениями двух переменных в Python

Обмен значениями двух переменных в Python на самом деле очень простая задача. Python позволяет довольно легко поменять два значения без большого объема кода. Проверьте, насколько легко поменять местами два числа, используя встроенные методы, приведенные ниже:

Example 1

x, y = 21, 64

print(x, y)

x, y = y, x

print(y, x)

Output

21 64 64 21

Python program to swap two elements in a list

Below given a program that swaps the two elements with given positions in the list.

Since the positions of the elements are known, we can simply swap the positions of the elements.

Example 2

List = [23, 65, 19, 90]

pos1, pos2 = 1, 3

print(“List before swapping: “, List)

List[pos1], List[pos2] = List[pos2], List[pos1]

print(“List after swapping 1st and 3rd

elements:”)

print(List)

Intput

List = [23, 65, 19, 90], pos1 = 1, pos2 = 3

Output

List before swapping: [23, 65, 19, 90]

List after swapping 1st and 3rd elements:

[23, 90, 19, 65]

Practice 1

1. Create new blank list

2. Add numbers from 1 to 10 using loop.

3. Swap elements with index 3 and 7.

4. Swap elements with index 3 and 5.

5. Print List before and after swapping.

Practice 2

1. Create new blank list

2. Add ODD numbers from 3 to 20 using loop.

3. Swap elements with index 2 and 6.

4. Print List before and after swapping.

list.pop()

pop() - извлечение элемента из списка, функция без параметра удаляет по умолчанию последний элемент списка.

Example 3

List = [ 1, 2, 3, 4]

print(List.pop())

print(“New List after pop: “, List)

Output

4

New List after pop: [1, 2, 3]

Example 4

List = [1, 2, 3, 4]

print(List.pop(2))

print(“New List after pop: “, List)

Output

3

New List after pop: [1, 2, 4]

Swap items in a list using Inbuilt list.pop() function

Pop the element at pos1 and store it in a variable. Similarly, pop the element at pos2 and store it in another variable. Now insert the two popped element at each other’s original position.

Example 5

List = [23, 65, 19, 90]

pos1, pos2 = 1, 3

print(“List before swapping: “, List)

first_element = List.pop(pos1)

second_element = List.pop(pos2 - 1)

List.insert(pos1, second_element)

List.insert(pos2, first_element)

print(“List after swapping 1st and 3rd elements:”)

print(List)

Output

4

New List after pop: [1, 2, 3]

Keep in mind

list.pop(index)

Извлечение элемента из списка, функция без параметра удаляет по умолчанию последний элемент списка, в качестве параметра можно поставить произвольный индекс:

Если указанный индекс находится за пределами списка, выдаст ошибку IndexError.

Practice 3

1. Enter the number of elements in the list.

2. Enter the values of elements into the list.

3. Swap the first and last element in the list.

4. Print the newly formed list.

Terminology

swap – орынындарын алмастыру – менять

element – элемент – элемент

pop – шығарып алу – вывезти

even – жұп – четный

odd – тақ – нечетный

3.5 SORTING IN PYTHON LIST

You will:

Learn to swap elements in a list;

What’s the fastest way to alphabetize your bookshelf?

Функция сортировки списка sort ()

Вы можете использовать функцию сортировки для сортировки списка по возрастанию, убыванию или в особом порядке.

To sort the list in ascending order.

List.sort() - sorts the given list in ascending order.

This function can be used to sort a list of integers, floating point number, string, and others.

Example 1

List = [1, 3, 4, 2]

#Sorting list of Integers in ascending

List.sort()

print(List)

Output

[1, 2, 3, 4]

To sort the list in descending order.

List.sort(reverse = True) - sorts the given list in descending order.

Example 2

List = [1, 3, 4, 2]

# Sorting list of Integers in descending

List.sort(reverse = True)

print(List)

Output

[4, 3, 2, 1]

Practice 1

1. Create a new blank list

2. Add at least 7 fruits.

3. Sort your list in reverse alphabetic order.

4. Print List before and after sorting.

Practice 2

1. Create a new blank list named “bookshelf”.

2. Add names of your favorite books. At least 10 books.

3. Sort your books in alphabetic order.

4. Print your sorted bookshelf.

Python sorted()

The sorted() method sorts the elements of a given iterable in a specific order - Ascending or Descending.

The syntax of sorted() method is:

sorted(iterable[, key][, reverse])

sorted() method returns a sorted list from the given iterable.

Example 3

# vowels list

pyList = [‘e’, ‘a’, ‘u’, ‘o’, ‘i’]

print(sorted(pyList))

# string

pyString = ‘Python’

print(sorted(pyString))

# vowels tuple

pyTuple = (‘e’, ‘a’, ‘u’, ‘o’, ‘i’)

print(sorted(pyTuple))

Output

[‘a’, ‘e’, ‘i’, ‘o’, ‘u’]

[‘P’, ‘h’, ‘n’, ‘o’, ‘t’, ‘y’]

[‘a’, ‘e’, ‘i’, ‘o’, ‘u’]

Bubble sort in python

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order.

Example 4

List = [64, 34, 25, 12, 22, 11, 90]

for i in range(n):

# Last i elements are already in place

for j in range(0, n-i-1):

# traverse the array from 0 to n-i-1

# Swap if the element found is greater than the next element

if List[j] > List[j+1]:

List[j], List[j+1] = List[j+1], List[j]

print(“Sorted array is:”)

print(List)

Output

Sorted array is:

[11, 12, 22, 25, 34, 64, 90]

Keep in mind

Iterable - sequence (string, tuple, list) or collection (set, dictionary, frozen set) or any iterator.

Keep in mind

Use list.sort() when you want to mutate the list, sorted() when you want a new sorted object back. For lists, list.sort() is faster than sorted() because it doesn’t have to create a copy.

Activity

Make small research about common sorting algorithms.

Literacy

1. Which method of sorting you usually use?

2. How often is sorting used in real life?

Terminology

sort – сұрыптау – сортировать

ascending – өсу тəртібі – по возрастанию

descending – кему тəртібі – по убыванию

reverse – кері – обратная

traverse – айналдыру – перемещать

3.6 REMOVING ELEMENTS FROM A LIST

You will:

Learn to swap elements in a list;

В наших предыдущих уроках мы добавляли элементы в список. Теперь мы будем удалить элемент из списка.

Мы используем функцию Pop (), чтобы удалить элемент из списка. Функция pop () удаляет элемент в указанном индексе или удаляет последний элемент, если индекс не указан.

Example 1

clrs = [“Red”, “Blue”, “Black”, “Green”, “White”]

print(clrs)

clr = clrs.pop(3)

print(“{0} was removed”.format(clr))

Output

[‘Red’, ‘Blue’, ‘Black’, ‘Green’, ‘White’]

Green was removed

Убираем элемент с индексом 3. Метод pop () возвращает значение удаленного элемента; выводим результат на экран.

Example 2

clr = clrs.pop()

print(“{0} was removed”.format(clr))

Output

White was removed

The last element from the list, namely “White” string, is removed from the list.

The remove() method removes a particular item from a list.

Example 3

clrs.remove(“Blue”)

print(clrs)

Output [‘Red’, ‘Black’] Practice 1 You’ve just earned 50 000 000 tenges, awesome! You decide to build a pool house and a garage. Can you add the information to the areas list?

areas=[“hallway”, 11.25, “kitchen”, 18.0, “chillzone”, 20.0, “bedroom”, 10.75, “bathroom”, 10.50 ]

Information: “poolhouse”, 24.5 “garage, 15.45

Example #3 removes a “Blue” string from the “clrs” list. From the output of the script we can see the effects of the described methods.

A del keyword can be used to delete list elements as well. In the example below, we have a list of strings. We use the del keyword to delete list elements.

Example 4

clrs = [“Red”, “Blue”, “Black”, “Green”, “White”]

print(clrs)

del clrs[1]

print(clrs)

Output

[‘Red’, ‘Blue’, ‘Black’, ‘Green’, ‘White’]

[‘Red’, ‘Black’, ‘Green’, ‘White’]

We remove the second string from the list. It is the “Blue” string.

Example 5

del clrs[:]

print(clrs)

Output

[]

Here we remove all the remaining elements from the list. The [ : ] characters refer to all items of a list.

Practice 2

1. Create and initialize a list;

2. Enter random 10 numbers into the list;

3. Remove 5 elements using different methods of removing;

Practice 3

There was a mistake! The amount of money you’ve earned is not that big after all and it looks like the pool house isn’t going to happen. You decide to remove the corresponding string and float from the areas list.

areas = [“hallway”, 11.25, “kitchen”, 18.0, “chill zone”, 20.0, “bedroom”, 10.75, “bathroom”, 10.50, “poolhouse”, 24.5, “garage”, 15.45]

Keep in mind

We can delete only existing elements. If we write del clrs[15], we will receive an IndexError message.

Literacy

1. Explain the differences between pop(), remove(), del and [ : ]?

2. What would happen if write pop() with the same index?

3. What would happen if we try to delete an item that doesn’t exist?

Terminology

remove – алып тастау – удалить

alphabetize – əліпбилік ретпен қою – располагать по алфавиту

corresponding – сəйкес келетін – соответствующий

3.7 TWO-DIMENSIONAL LIST IN PYTHON

You will:

create two-dimensional array in python;

use two-dimensional array.

In real-world often tasks have to store rectangular data table. How to write them in python list?

Список вложенный в список

Вы уже видели, что элемент в списке может быть объектом любого типа. Объект в списке также может иметь отдельный список, и элементы в этом списке тоже могут отдельным списком итд.

Example 1

>>> x = [‘a’, [‘bb’, [‘ccc’, ‘ddd’], ‘ee’, ‘ff ’], ‘g’, [‘hh’, ‘ii’], ‘j’]

>>> x

[‘a’, [‘bb’, [‘ccc’, ‘ddd’], ‘ee’, ‘ff ’], ‘g’, [‘hh’, ‘ii’], ‘j’]

The object structure that x references is diagrammed below:

x[0], x[2], and x[4] are strings, each one character long:

>>> print(x[0], x[2], x[4])

a g j

But x[1] and x[3] are sublists:

>>> x[1]

[‘bb’, [‘ccc’, ‘ddd’], ‘ee’, ‘ff ’]

>>> x[3]

[‘hh’, ‘ii’]

To access the items in a sublist, simply append an additional index:

>>> x[1]

[‘bb’, [‘ccc’, ‘ddd’], ‘ee’, ‘ff ’]

>>> x[1][0]

‘bb’

>>> x[1][1]

[‘ccc’, ‘ddd’]

All the usual syntax regarding indices and slicing applies to sublists as well:

>>> x[1][1][-1]

‘ddd’

>>> x[1][1:3]

[[‘ccc’, ‘ddd’], ‘ee’]

>>> x[3][::-1]

[‘ii’, ‘hh’]

Practice 1

Write correct index to print out “big red apple“.

fruits = [[“banana”, “cherry”, “apple”], [“green”, “orange”, “red”,],

[“small”, “medium”, “big”]]

Creating nested lists

Suppose that two numbers are given: the number of rows of n and the number of columns m.

You must create a list of size nЧm, filled with zeros.

A possible way: you can create a list of n elements (say, of n zeros) and then make each of the elements a link to another one-dimensional list of m elements:

n = 3

m = 4

a = [0] * n

for i in range(n):

a[i] = [0] * m

Another way: create an empty list and then append a new element to it n times (this element should be a list of length m):

n = 3

m = 4

a = [0] * n

for i in range(n):

a[i] = [0] * m

But the easiest way is to use the generator, creating a list of n elements, each of which is a list of m zeros:

n = 3

m = 4

a = [[0] * m for i in range(n)]

In this case, each element is created independently from the others. The list [0] * m is n times constructed as the new one, and no copying of references occurs.

Practice 2

Create 5x5 list and change item at index[3][2].

Literacy

1. What is the difference between normal list and nested list?

2. Where we can use two-dimensional array?

Give three real-life examples.

Terminology

Nested – кірістірілген – вложенный

two-dimensional – екі өлшемді – двумерный

arbitrary – ерікті, еркін – произвольный

regarding – қатысты – относительно

3.8 SORTING TWO-DIMENSIONAL LIST

You will:

learn to sort two- dimensional arrays.

Сортировать по определенному индексу

Мы можем отсортировать список, используя обычную функцию сортировки. Это сортирует список по первому индексу списков. Но чаще всего могут возникать обстоятельства, которые требуют сортировки списка по другим элементам индекса, чем первый. Давайте обсудим некоторые способы выполнения этой задачи.

Method #1 : Using sort() + lambda

sort() can be used to perform this variation of sort by passing a function as a key that performs the sorting according to the desired inner list index.

Example 1

# initializing list

List = [[“Darkhan”, 4, 28], [“Yerbol”, 2, 20], [“Aibek”, 1, 20], [“Askhat”, 3, 21]]

# printing original list

print(“Original list:”)

print(List)

# using sort() + lambda to sort list

List.sort(key = lambda List: List[1])

# printing result

print(“List after sorting by 2nd element:”)

print(List)

Output

Original list:

[[‘Darkhan’, 4, 28], [‘Yerbol’, 2, 20], [‘Aibek’, 1, 20], [‘Askhat’, 3, 21]]

List after sorting by 2nd element:

[[‘Aibek’, 1, 20], [‘Yerbol’, 2, 20], [‘Askhat’, 3, 21], [‘Darkhan’, 4, 28]]

The lambda keyword lets us define a mini-function which receives List (in this case, our row) and returns the second element of List (List[1]).

Method #2 : Using sorted() + itemgetter()

This method can also be applied to perform this particular task. The advantage of this method is that it does not modify the original list. itemgetter() is used to get the index element by which the sort operation needs to be performed.

Example 2

# import itemgetter

from operator import itemgetter

# initializing list

List = [[“Darkhan”, 4, 28], [“Yerbol”, 2, 20], [“Aibek”, 1, 20], [“Askhat”, 3, 21]]

# using sorted() + itemgetter to sort list

res = sorted(List, key = itemgetter(1))

# printing result

print(“List after sorting by 2nd element:”)

print(res)

Output

List after sorting by 2nd element:

[[‘Aibek’, 1, 20],

[‘Yerbol’, 2, 20],

[‘Askhat’, 3, 21],

[‘Darkhan’, 4, 28]]

Practice 1

1. Create and initialize two-dimensional list;

2. Every row should contain “Name” and “Year of birth”;

3. Sort list by Name;

4. Sort list by Year of birth.

Practice 2

1. Create a two-dimensional list;

2. Insert “Film names” and “Date of releases” to the list;

3. Sort list by Date of releases in ascending order and descending order.

Hint: use reverse.

Literacy

1. Is there any difference between sorting the normal list and multi-dimensional list?

2. What would be the result if we sort list by one element, then sort again by another element?

Terminology

specified – арнайы – указанный

circumstance – жағдай – обстоятельство

perform – орындау – выполнять

variation – вариация – вариация

3.9 INSERT/DELETE VALUES IN 2D LIST

You will:

learn to insert values in a two-dimensional list;

learn to update values in a two-dimensional list;

learn to delete values in a two-dimensional list.

Where two or three dimensional arrays can be used in real life?

Добавить элемент в двумерный список

Мы можем вставить новые элементы данных в определенную позицию, используя метод insert() и указав индекс.

В приведенном ниже примере новый элемент данных вставляется в позиции индекса 2.

Example 1

List = [[11, 12, 5, 2], [15, 6, 10], [10, 8, 12, 5],

List.insert(2, [0,5,11,13,6])

for x in List:

for y in x:

print(y, end = “ ”)

print()

Когда приведенный выше код выполняется, он дает следующий результат.

Output

11 12 5 2

15 6 10

0 5 11 13 6

10 8 12 5

Updating Values in Two-Dimensional Array

We can update the entire inner array or some specific data elements of the inner array by reassigning the values using the array index.

Example 2

List = [[11, 12, 5, 2], [15, 6, 10], [10, 8, 12, 5], [12,15,8,6]]

List[2] = [11,9]

List[0][3] = 7

for x in List:

for y in x:

print(y, end = “ ”)

print()

Output

11 12 5 7

15 6 10

11 9

12 15 8 6

Practice 1

The list given below is the сalendar for May.

1. Insert this information to the two-dimensional list;

2. Find the national holidays of Republic Kazakhstan and replace them with the word “Holiday”.

Deleting the Values in Two-Dimensional Array

We can delete the entire inner array or some specific data elements of the inner array by reassigning the values using the del() method with index. But in case you need to remove specific data elements in one of the inner arrays, then use the update process described above.

Example 3

List = [[11, 12, 5, 2], [15, 6,10], [10, 8, 12, 5], [12,15,8,6]]

del List[3]

for x in List:

for y in x:

print(y, end = “ “)

print()

Output

11 12 5 2

15 6 10

10 8 12 5

Keep in mind

We can use this type of data structure to encode information about an image. For example, the following grayscale image could be represented by the following list:

x=[[236, 189, 189, 0],

[236, 80, 189, 189],

[236, 0, 189, 80],

[236, 189, 189, 80]]

Practice 2

1. Create 4Ч5 two-dimensional list;

2. Insert 0s and 1s to the list according to the letter shown in figure right;

3. Insert 0s where it’s empty and 1s where it’s filled in the figure;

4. Update list values so that to change letter K to letter O.

Literacy

1. What is the difference between inserting value and updating value?

2. What we should do to delete only one element from an inner array, not the entire row?

Terminology

value – мəні – значение

execute – орындау – выполнять

reassign – қайта мəн беру – переназначить

inner – ішкі – внутренний

CHECK YOURSELF

1. What type is the following variable?

x = “Hi there”

a) float

b) integer

c) boolean

d) string

2. How many lines will this program print?

while True:

print “hi”a) 0

b) 10

c) 100

d) an infinite number of lines

3. How many lines will this program print?

x = 10

while x > 0:

print x

x = x - 3

a) 3

b) 4

c) 5

d) 6

4. Which of the following programs prints ten lines?

a) for i in range(10):

print “hi”

b) for i = 1 to 10:

print “hi”

c) for i in 1 - 10:

print “hi”

d) for i from 0 to 9:

print “hi”

5. Which of the following best describes the purpose of a for loop?

a) A for loop is for doing something an indeterminate number of times.

b) A for loop is doing something an infinite number of times.

c) A for loop is for doing something a fixed number of times.

d) A for loop is for doing something three times.

6. Which Python keyword skips back to the beginning of a loop?

a) break

b) continue

7. Which Python keyword exits a loop?

a) break

b) continue

8. What does the following program print?

for i in range(2):

for j in range(2):

print i + j

a) 0

1

1

2

b) 0112

c) 0

1

0

1

d) 0101

9. How many lines does the following program print?

for i in range(3):

for j in range(5):

print “hi”

a) 3

b) 5

c) 8

d) 15

10. Which of the following while loops would continue to loop as long as num is in the range 3 to 12, exclusive?

a) while num > 12 and num < 3:

# do something with num

b) while num < 12 or num > 3:

# do something with num

c) while num <= 12 and num >= 3:

# do something with num

d) while num < 12 and num > 3:

# do something with num

11. What is the value of sum when this loop completes?

sum = 0

for i in range(3):

sum = sum + 5

for j in range(2):

sum = sum - 1

a) 8

b) 9

c) 20

d) 0

12. Which of the following for loops would print the following numbers?

3

5

7

9

a) for i in range(3, 10, 2):

print i

b) for i in range(3, 9, 2):

print i

c) for i in range(9):

print i

d) for i in range(3,9):

print i

13. Which of the following for loops would print the following numbers?

0

1

2

3

4

5

a) for i in range(5):

print i

b) for i in range(1, 5, 1):

print i

c) for i in range(6):

print i

d) for i in range(0,5, 1):

print i

14. What does this program print?

for i in range(6):

if i == 3:

continue

print i

a) 0

1

2

b) 0

1

2

3

c) 0

2

4

6

d) 0

1

2

4

5

15. Which of the following Python programs creates a list with the numbers 1 through 5?

a) my_list = (1, 2, 3, 4, 5)

b) my_list = [1, 2, 3, 4, 5]

c) my_list = 1, 2, 3, 4, 5

d) my_list = “1, 2, 3, 4, 5”

16. Look at the following program:

my_list = [“bananas”, “oranges”, “grapes”,

“pineapples”, “apples”]

# You pick the code that goes here...

# ...

# ...

print my_list

Pick the code that results in the following output:

[‘apples’, ‘bananas’, ‘grapes’, ‘oranges’, ‘pineapples’]

a) my_list.sort()

my_list.reverse()

b) my_list.sort()

c) my_list.reverse()

d) my_list.remove(“grapes”)

17. What does this program print?

my_list = [-4, 2, 3, 2, -2, 5]

print [x % 2 == 0 for x in my_list]

a) [True, True, False, True, True, False]

b) False

c) [0, 0, 1, 0, 0, 1]

d) [-4, 2, 2, -2]

18. Which of the following lines of code will cause an error?

Use the following definition of ages:

ages = (12, 5, 8)

a) ages = ages + (1, 3, 5)

b) print ages[2]

c) ages = ages[2:]

d) ages[0] = 3

19. What does this code snippet print?

fruit = [“b”, “n”, “n”, “”]

print “a”.join(fruit)

a) bnn

b) ba na na

c) banana

d) abanana

20. What is the value of num after this code runs?

shapes = [“triangle”, “square”, “hexagon”, “circle”, “pentagon”]

num = len(shapes)

a) 0

b) 4

c) 5

d) 35

CHAPTER 4. PROGRAMMING 2D GAMES

4.1 PYGAME LIBRARY

You will:

Install PyGame library;

use the PyGame library to create a window for the game.

What does ‘library’ mean in the case of programming languages?

What is PyGame?

PyGame (the library) is a Free and Open Source python programming language library for making multimedia applications. Pygame is highly portable and runs on nearly every platform and operating system.

PyGame makes it simple to:

- Draw graphic shapes

- Display bitmapped images

- Animate

- Interact with keyboard, mouse, and gamepad

- Play sound

- Detect when objects collide

How to install Pygame library

The best way to install pygame is with the pip tool (which is what python uses to install packages). Note, this comes with python in recent versions. We use the --user fl ag to tell it to install into the home directory, rather than globally.

py -m pip install -U pygame --user

To see if it works, run one of the included examples

py -m pygame.examples.aliens

If it works, you are ready to go!

The first code a Pygame program needs to do is load and initialize the Pygame library. Every program that uses Pygame should start with Importing and initializing Pygame:

# Import a library of functions called ‘pygame’

import pygame

# Initialize all imported pygame modules

pygame.init()

Simple Pygame Window

pygame.display.set_mode(resolution=(width, height))

This function will create a display Surface. The resolution argument is a pair of numbers representing the width and height.

Keep in mind

Important:

Don’t name any file “pygame.py”

The import pygame looks for a library file named pygame. If a programmer creates a new program named pygame.py, the computer will import that file instead! This will prevent any pygame programs from working until that pygame.py file is deleted

Practice 1

Create a simple PyGame window of 600 pixels in height and 400 pixels in width and run. What did you notice?

If you run the code above, a 600x400 pixel window will appear and close immediately.

Why does the window close immediately?

Because the program ends after the execution of these expressions. Neither init () nor set_mode () suggest cyclic event. That’s why you need to create a loop, causing the program to hang. And now, create a loop:

Example 1

run = True

while run:

for event in pygame.event.get(): # User did something

if event.type == pygame.QUIT: # If user clicked close

run = False # Close clicked so exit this loop

To set the title of the window (which is shown in the title bar) use the following line of code:

pygame.display.set_caption(“Title”)

Ending the Program

Right now, clicking the “close” button of a window while running this Pygame program in IDLE will still cause the program to crash. The problem is, even though the loop has exited, the program hasn’t told the computer to close the window. By calling the command below, the program will close any open windows and exit as desired.

pygame.quit() # Uninitialize all pygame modules

Practice 2

1. Create a simple PyGame window(495x120 pixels).

2. Set title “Cool game in PyGame“.

Literacy

1. What is the PyGame library?

2. What functions does PyGame provide?

3. What can you get if you use it?

Terminology

library - кітапхана - библиотека

package - пакет - пакет

collide – соқтығысу - сталкиваться

import – импорттау - импортировать

surface – беті - поверхность

initialize – инициализациялау - инициализировать

event – жағдай - событие

4.2 BACKGROUND IMAGE IN PYGAME

You will:

Set a background image.

What makes you want to play a 2d game?

How to create background

First of all, you need to add variables that define colors that you use in program. Colors are defined in a list of three colors: red, green, and blue.

As you remember, lists in Python are surrounded by either square brackets or parentheses. Individual numbers in the list are separated by commas. Below is an example that creates variables and sets them equal to lists of three numbers. These lists will be used later to specify colors.

# Define some colors

BLACK = ( 0, 0, 0)

WHITE = ( 255, 255, 255)

GREEN = ( 0, 255, 0)

RED = ( 255, 0, 0)

BLUE = ( 0, 0, 255)

Clearing the Screen

The following code clears whatever might be in the window with a white background. Remember that the variable WHITE was defined earlier as a list of 3 RGB values.

# Clear the screen and set the screen background

screen.fill(WHITE)

Keep in mind

To find RGB code of color you need you can use online color picker at

www.colorpicker.com

Flipping the Screen

Very important!

You must flip the display after you draw. The computer will not display the graphics as you draw them because it would cause the screen to flicker. This waits to display the screen until the program has finished drawing. The command below “flips” the graphics to the screen.

# Go ahead and update the screen with what we’ve drawn

pygame.display.flip()

Practice 1

1. Create a window (500 x 600 pixels);

2. Set background color to green;

Hint: use .fill() and .flip() methods.

Setting a background image

Any bitmap images used in a game should already be sized for how it should appear on the screen.

Don’t take a 5000 x 5000 pixel image from a high-resolution camera and then try to load it into a window only 800 x 600.

Loading an image is a simple process and involves only one line of code.

bkground_image = pygame.image.load(“image.jpg”)

“pygame.image.load” method is used to load an image.

The image needs to be converted to a format Pygame can more easily work with. To do that, we append .convert() to the command to call the convert function.

bkground_image=pygame.image.load(“image.jpg”).convert()

Call blit method to draw image on screen. This command should be done inside the loop so the image gets drawn each frame.

screen.blit(bkground_image, [0, 0])

This code blit’s the image held in bkground_image to the screen starting at (0, 0).

Practice 2

1. Create a window (800 x 600 pixels);

2. Set title “Space Invaders“;

3. Find a space image and set to background.

Keep in mind

This file must be located in the same directory that the python program is in, or the computer will not find it.

Keep in mind

Loading the image should be done before the main program loop.

Literacy

1. Explain the steps of setting background image.

2. What is the difference between setting background color and background image?

Terminology

background - фон - фон

fill - толтыру - заполнить

flip - айналдыру - перевернуть

load - жүктеу - загрузить

append - қосу - присоединять

appear - пайда болу - появляться

4.3 DRAWING SHAPES. PYGAME ANIMATION.

You will:

Draw different shapes;

Program character movement.

What is the most important element in video games?

Drawing shapes

A program can draw things like rectangles, polygons, circles, ellipses, arcs, and lines.

pygame.draw.rect(Surface, color, (x, y, width, height), thickness)

Draws a rectangular shape on the Surface.

Example 1

pygame.draw.rect(screen, WHITE, [100, 100, 400, 300], 2)

This example will draw a rectangle as a line

Keep in mind

The Surface.fill() method works just as well for drawing filled rectangles.

Example 2

pygame.draw.rect(screen, WHITE, [100, 100, 400, 300])

This example will draw a rectangle that is filled in.

Some other pygame modules for drawing shapes

pygame.draw.polygon - draw a shape with any number of sides

pygame.draw.circle - draw a circle around a point

pygame.draw.ellipse - draw a round shape inside a rectangle

pygame.draw.arc - draw a partial section of an ellipse

pygame.draw.line - draw a straight line segment

pygame.draw.lines - draw multiple contiguous line segments

Practice 1

1. Create a window (800 x 600 pixels);

2. Set background image;

3. Create blue rectangle (100 x 100 pixels) at the center of the window.

Moving the object with keyboard

In order to move your object within pygame you will need to find out whether the user has pressed a certain key or not from the value of the event’s key property.

pygame.key - pygame module to work with the keyboard. This module contains functions for dealing with the keyboard.

The event queue gets pygame. KEYDOWN and pygame.KEYUP events when the keyboard buttons are pressed and released. Both events have a key attribute that is a integer ID representing every key on the keyboard.

Below is the script to move a square in the right or the left direction on the display screen.

# First initialize MOVE_LEFT or MOVE_RIGHT directions

MOVE_RIGHT = 1

MOVE_LEFT = 2

DIRECTION = 0

# put inside loop

for event in pygame.event.get():

if event.type == pygame.QUIT:

run = False

if event.type == pygame.KEYDOWN:

if event.key == pygame.K_LEFT:

direction=left

elif event.key == pygame.K_RIGHT:

direction=right

elif event.type == pygame.KEYUP:

if event.key == pygame.K_LEFT:

direction=0

elif event.key==pygame.K_RIGHT:

direction=0

if direction==left:

x-=1

elif direction==right:

x+=1

Practice 2

Continue the script above and move object UP and DOWN;

Hint: use event.key = pygame.K_UP, event.key = pygame.K_DOWN

Keep in mind

It is not possible to change a .jpg to another format just by renaming the file extension to .png. It is still a .jpg even if you call it something different. It requires conversion in a graphics program to change it to a different format.

Literacy

1. What is the difference between adding background image and character image?

2. Which image formats are better to use, if you are picking out an image that will be transparent? Why?

Terminology

draw - сызу - рисовать

thickness - қалыңдық - толщина

key – батырма - клавиша

script – сценарий - сценарий

direction – бағыт - направление

transparent – мөлдір - прозрачный

pick out – таңдау - выбрать

4.4 UPLOADING CHARACTER

You will:

Upload ready characters for the game.

If you could be a video game character, who would you want to be and why?

Moving an Image

Now you will load a character image to your game. First of all, find and download any spaceship image. You can find a .gif or .png that you like with a white or black background.

Don’t use a .jpg.

To load the image you need the same type of command that you used with the background image. In this case, assume the file is saved as player.png.

player_img = pygame.image.load(“player.png”).convert()

Then, copy an image to the screen.

screen.blit(player_img, [x, y])

But now, if you run the code, you will get the space ship image with a solid white background. So when the image is drawn the program shows Figure 2.

You only want the space ship, not a rectangular background! But all images you can load are rectangles, so how to show only the part of the image you want?

The way to get around this is to tell the program to make one color “transparent” and not display. This can be done immediately after loading. The following makes the color WHITE transparent (assuming WHITE is already defined as a variable):

player_image.set_colorkey(WHITE)

This will work for most files ending in .gif and .png. (Figure 3)

This does not work well for most .jpg files (Figure 4).

Keep in mind

It is not possible to change a .jpg to another format just by renaming the file extension to .png. It is still a .jpg even if you call it something different. It requires conversion in a graphics program to change it to a different format.

Practice

Add some different types of enemies to your game, such as spacecraft, space rocks, and asteroids.

Literacy

1. What is the difference between adding a background image and character image?

2. Which image formats are better to use if you are picking out an image that will be transparent? Why?

Terminology

Assume - қабылдау - предполагать

immediately - дереу - немедленно

compression – қысу - сжатие

character – кейіпкер - персонаж

require – талап етеді - требовать

conversion – түрлендіру - преобразование

4.5 MOVING CHARACTERS

You will:

Learn to move an object with the mouse;

learn to move an object with the keyboard.

Do you prefer multiplayer games or to go solo? Why?

Moving an image with the mouse

In the previous lesson, you’ve loaded character images. Now, you will move these characters.

Inside the main program loop, the mouse coordinates are retrieved, and passed to another blit function as the coordinates to draw the image: # Get the current mouse position.

# This returns the position as a list of two numbers.

player_position = pygame.mouse.get_pos()

x = player_position[0]

y = player_position[1]

# Copy image to screen:

screen.blit(player_img, [x, y])

Add this parts of script to your game code. And you will control your spaceship using mouse.

Practice 1

1. Change the mouse pointer to the center of the spaceship;

2. Add the window edges. When spaceship reaches the edge of the window, it stops.

Moving an image with the keyboard

In the previous lesson, you’ve learned to move an object with the keyboard using method pygame.key. Now, you will learn to move image using the keyboard using a different method.

State checking

It’s possible to call functions from the pygame.key and pygame.mouse module to receive the state of the key and mouse. However, it’s not the recommended way to process events in pygame since there are some flaws with it:

- You’ll receive the states when the function is called, which means you might miss events between calls if the user is pressing buttons fast;

- You cannot determine the order of the events;

- You still need to call one of pygame’s event functions for pygame to internally interact with the operating system,

- otherwise, it’ll warn that the program has become unresponsive.

State checking

The key module has a function pygame.key.get_pressed() which returns a list of the state of all keys. The list contains 0 for all the keys which are not pressed and 1 for all keys that are pressed. Its index in the list is defined by constants in the pygame module, all prefixed with K_ and the key name.

Example

# Allow pygame to handle internal actions.

pygame.event.pump()

key = pygame.key.get_pressed()

key = pygame.key.get_pressed()

# moves image right if RIGHT_KEY is pressed

if key[pygame.K_RIGHT]:

x+=1

# moves image left if LEFT_KEY is pressed

if key[pygame.K_LEFT]:

x-=1

Practice 2

1. Add the window edges. When spaceship reaches the edge of the window, it stops.

2. Add UP and DOWN keys to move image up and down.

3. Change LEFT, RIGHT, UP, DOWN keys to A, D, W, S keys.

Terminology

coordinates - координаттары - координаты

retrieve - шығарып алу - извлекать

position – позициясы - положение

edge – жиегі - край

flaws – кемшіліктер - недостатки

internal – ішкі - внутренний

unresponsive – жауап бермейді - не реагирующий

to handle - орындау - обрабатывать

4.6 PROGRAMMING GAME CONDITIONS

You will:

Define and create classes;

learn to program arcade game with the ready scenario.

What is the most important aspect of video games today: story, graphics, or gameplay?

Introduction to Classes

Classes and objects are very powerful programming tools. They make programming easier. In fact, you are already familiar with the concept of classes and objects. A class is a “classification” of an object. Like “person” or “image.” An object is a particular instance of a class. Like “Mary” is an instance of “Person.”

Objects have attributes, such as a person’s name, height, and age. Objects also have methods. Methods define what an object can do, like run, jump, or sit.

Defining and Creating Simple Classes

A better way to manage multiple data attributes is to define a structure that has all of the information. Then we can give that “grouping” of information a name, like Character. This can be easily done in Python and any other modern language by using a class.

Example 1

# This is a class that represents the main

# character in a game.

class Character():

# This is a method that sets up the variables

# in the object.

def __init__(self):

self.name = “Link”

self.max_hit_points = 50

self.current_hit_points = 50

self.max_speed = 10

The def __init__(self): in a special function called a constructor that is run automatically when the class is created.

Adding Methods to Classes

A method is a function that exists inside of a class. The code below adds a method for a dog barking.

class Dog():

def __init__(self):

self.age = 0

self.name = “”

self.weight = 0

def bark(self):

print(“Woof”)

Method definitions in a class look almost exactly like function definitions. The big difference is the addition of a parameter self. The first parameter of any method in a class must be self. This parameter is required even if the function does not use it.

Example 2

This example code could be used in Python/Pygame to draw a ball. Having all the parameters contained in a class makes data management easier. The diagram for the Ball class is shown in Figure 1.

class Ball():

def __init__(self):

# --- Class Attributes ---

# Ball position

self.x = 0

self.y = 0

# Ball’s vector

self.change_x = 0

self.change_y = 0

# Ball size

self.size = 10

# Ball color

self.color = [255,255,255]

# --- Class Methods ---

def move(self):

self.x += self.change_x

self.y += self.change_y

def draw(self, screen):

pygame.draw.circle(screen,self.color, [self.x,self.y],self.size)

Below is the code that would go ahead of the main program loop to create a ball and set its attributes:

theBall = Ball()

theBall.x = 100

theBall.y = 100

theBall.change_x = 2

theBall.change_y = 1

theBall.color = [255,0,0]

This code would go inside the main loop to move and draw the ball:

theBall.move()

theBall.draw(screen)

Practice

1. Create a class called Cat.

2. Give it attributes for name, color, and weight.

3. Give it a method called meow.

Terminology

classification - жіктеу - классификация

instance - мысалы - пример

attributes – атрибуттар - атрибуты

exists – бар - существует

define – анықтау - определять

4.7 PROGRAM ARCADE GAMES

You will:

create an algorithm that calculates the game result;

learn to program arcade game with the ready scenario.

Introduction to Sprites

Our games need support for handling objects that collide. Balls bouncing off paddles, laser beams hitting aliens, etc. All of these examples require collision detection.

The Pygame library has support for sprites. A sprite is a two-dimensional image that is part of the larger graphical scene.

Basic Sprites and Collisions

Let’s step through an example program that uses sprites. This example shows how to create a screen of black blocks, and collect them using a red block controlled by the mouse. The program keeps “score” on how many blocks have been collected.

import pygame

import random

BLACK = ( 0, 0, 0)

WHITE = (255, 255, 255)

RED = (255, 0, 0)

class Block(pygame.sprite.Sprite):

This class is a child class of the Sprite class. The pygame. sprite. specifies the library and package.

def __init__(self, color, width, height):

super().__init__()

The constructor for the Block class takes in a parameter for self just like any other constructor. It also takes in parameters that define the object’s color, height, and width.

It is important to call the parent class constructor in Sprite to allow sprites to initialize.

self.image = pygame.Surface([width, height])

self.image.fill(color)

Create an image that will eventually appear on the screen. There is one more important line that we need in our constructor, no matter what kind of sprite we have:

self.rect = self.image.get_rect()

Done with the Block class. Time to move on to the initialization code.

pygame.init()

screen_width=700

screen_height=400

screen=pygame.display.set_mode([screen_width,screen_height])

block_list = pygame.sprite.Group()

all_sprites_list = pygame.sprite.Group()

We can draw and move all the sprites with one command if they are in a group. We can also check for sprite collisions against an entire group.

for i in range(50):

block = Block(BLACK, 20, 15)

block.rect.x = random.randrange(screen_width)

block.rect.y = random.randrange(screen_height)

block_list.add(block)

all_sprites_list.add(block)

The loop adds 50 black sprite blocks to the screen. Then adds the block to the list of blocks the player can collide with and adds it to the list of all blocks.

player = Block(RED, 20, 15)

all_sprites_list.add(player)

Created a RED player block and added to the all_sprites_list so it can be drawn, but not the block_list.

done = False

clock = pygame.time.Clock()

score = 0

while not done:

for event in pygame.event.get():

if event.type == pygame.QUIT:

done = True

screen.fill(WHITE)

pos = pygame.mouse.get_pos()

player.rect.x = pos[0]

player.rect.y = pos[1]

blocks_hit_list = pygame.sprite.spritecollide(player, block_list, True)

This line of code takes the sprite referenced by a player and checks it against all sprites in block_list.

for block in blocks_hit_list:

score +=1

print(score)

This loop checks the list of collisions.

all_sprites_list.draw(screen)

The Group class that all_sprites_list is a member of has a method called “draw”. With only one line of code, a program can cause every sprite in the all_sprites_list to draw.

clock.tick(60)

pygame.display.flip()

pygame.quit()

This lines flip the screen and call the quit method when the main loop is done.

Moving Sprites

Put this in the sprite:

def update(self):

self.rect.y += 1

Put this in the main program loop:

block_list.update()

Practice 1

1. Write the whole code and run.

2. End the game, if all blocks are fallen.

3. Write the result of the game WIN or LOSE depending on the score.

Practice 2

1. Change the black and red blocks to character images.

CHECK YOURSELF

1. What is a Sprite?

a) A function that draws images to the screen.

b) A very bright color that seems to glow.

c) A sprite is to Tinkerbell as a human is to Bob.

d) A graphic image that the computer can easily track, draw on the screen, and detect collisions with.

2. What is the standard way to draw sprites in a program?

a) Call the sprite’s .blit(screen) method.

b) Call the sprite’s .draw(screen) method.

c) Call the sprite’s .update(screen) method.

d) Add a sprite to a group. Then call .draw(screen) on the group.

3. Select the best class definition for an alien:

a) class Alien():

def __init__(self):

self.name = “”

self.height = 7.2

self.weight = 156

b) class alien():

def __init__(self):

self.name = “”

self.height = 7.2

self.weight = 156

c) class alien.name = “”

class alien.height = 7.2

class alien.weight = 156

d) class alien(

def __init__(self):

self.name = “”

self.height = 7.2

self.weight = 156

)

4. What does this code do?

d1 = Dog()

d2 = Dog()

a) Creates two objects, of type Dog.

b) Creates two classes, of type Dog.

c) Creates one object, of type Dog.

5. What code will get the x and y position of the mouse?

a) pos = pygame.mouse.get_pos()

x = pos(x)

y = pos(y)

b) pos = pygame.mouse.get_pos()

x = pos[x]

y = pos[y]

c) pos = pygame.mouse.get_pos()

x = pos[0]

y = pos[1]

d) x = pygame.mouse.get_pos(x)

y = pygame.mouse.get_pos(y)

e) x = pygame.mouse.get_pos(0)

y = pygame.mouse.get_pos(1)

Tests answer keys:

Chapter 1:

8.d 9.a 10.d

Chapter 3:

1.d 2.d 3.b 4.a 5.c 6.b 7.a 8.a 9.d 10.d 11.b 12.a 13.c 14.d 15.b 16.b 17.a 18.d 19.c 20.c

Chapter 4:

1. d 2. d 3. a 4. a 5. c

GLOSSARY

A

Absolute Cell Reference – an absolute cell reference is one that does not change when it is copied.

Algorithm – a set of rules for solving a problem in a finite number of steps.

ASCII – a standard code, consisting of 128 7-bit combinations, for characters stored in a computer or to be transmitted between computers.

B

Binary number – number, expressed as 0 or 1.

BIt – also called binary digit. a single, basic unit of information, used inconnection with computers and information theory.

Bold – text that is darkened to help emphasize.

Bug – coding error in a computer program.

Byte – a group of bits, usually eight, processed as a single unit of data.

C

Cache – a temporary storage space or memory that allows fast access to

data.

Cell – a cell is a rectangular area formed by the intersection of a column

and a row.

Chart – a graphic representation, as by curves, of a dependent variable, as

temperature, price, etc.; graph.

Column – columns run vertically on the spreadsheet screen.

Compile – to translate (a computer program) from a high-level language into another language, usually machine language.

Computer virus – an unauthorized program that inserts itself into a computer system and then propagates itself to other computers via networks or disks.

CPU – central processing unit: the key component of a computer system, which contains the circuitry necessary to interpret and execute program instructions.

Cybersecurity – is the security of computers and users information.

D

Data – individual facts, statistics, or items of information.

DDoS – a method of attacking a computer system by flooding it with so many messages that it is obliged to shut down.

Debugging – to detect and remove defects or errors from.

Decimal – any number used in the decimal system.

Delay – the interval between one event and another.

Digital – using data in the form of numerical digits.

DNS Server – networking system in place that allows us to resolve human-friendly names to unique addresses.

Download – to copy or transfer (data or a program) into the memory of one computer system from a larger one.

E

Electronic devices – a device that accomplishes its purpose electronically.

Encode – to convert (a message, information, etc.) into code.

F

Fiber-optic cable – a glass or plastic fiber that has the ability to guide light along its axis.

Field – any number of columns regularly used for recording the information.

Formula – a formula is a spreadsheet data type that will calculate a result and display it in the active cell.

Function – functions are built-in formulas that are used to enter either commonly used or very complex formulas.

I

Information – important or useful facts obtained as output from a computer by means of processing input data with a program.

Input – data to be entered into a computer for processing.

Internet – a vast computer network linking smaller computer networks worldwide.

IP address – a code that identifies a computer network or a particular computer or other device on a network, consisting of four numbers separated by periods.

Italic – style of printing types in which the letters usually slope to the right.

L

Laptop – a portable computer, usually battery powered, small enough to rest on the user’s lap and having a screen that closes over the keyboard like a lid.

Latency – the time required online or in a network for the one-way or round-trip transfer of data between two nodes.

Loop – a series of instructions in a program, performed repeatedly until some specified condition is satisfied.

M

Modem – an electronic device that makes possible the transmission of data to or from a computer via telephone or other communication lines.

Mp3 – the file extension for MPEG Audio Layer-3, a set of standards for compressing and downloading audio files from the Internet.

N

Network – a system of computers and peripherals, such as printers, that are linked together.

O

Online – connected by computer to one or more other computers or networks, as through a commercial electronic information service or the Internet.

Operator – a symbol for expressing a mathematical operation.

Output – the information produced by a computer.

P

Phishing – to send ruse e-mail with a link to a replica of an existing web page, designed to fool users into submitting personal, financial, or password information.

Pixel – the smallest element of an image that can be individually processed in a video display system

Processor – another name for central processing unit.

Processor – a method of doing or producing something.

Programming – the act or process of planning or writing a program.

Programming language – a high-level language used to write computer programs.

R

Range – a range is a group of cells in a spreadsheet that have been selected.

Relative Reference – a relative cell reference is one that changes when it is copied.

Row – rows run horizontally on the spreadsheet screen.

S

Server – a computer that makes services, as access to data files, programs, and peripheral devices, available to workstations on a network.

Software – the programs used to direct the operation of a computer, as well as documentation giving instructions on how to use them.

T

Transistor – an electronic device that controls the flow of an electric current, most often used as an amplifier or switch.

Transmission – the act or process of sending a message, picture, or other information from one location to one or more other locations by means of radio waves, electrical signals, light signals, etc.

Transmit – to send or forward, as to a recipient or destination.

U

Update – to incorporate new or more accurate information in (a database, program, procedure, etc.).

Upload – to copy or transfer (data or a program) from one’s own computer into the memory of another computer.

User – a person who uses a computer.

V

Variable – a quantity or function that may assume any given value or set of values.

W

Wireless – communicating without connecting wires or other material contacts.

Worksheet – a worksheet is the grid of columns and rows that information is inputted into.

REFERENCES

1. MEŞECAN, İ. (2010). Microsoft Excel 2010. 1st ed. Zambak.

2. Ay, O., Oksuz, M. and Bozdag, O. (2003). Introduction to computers. 1st ed. Zambak.

3. AY, O. and HORASANLI, M. (2006). Programming with C++. 1st ed. Zambak.

4. Gesen, I., Kulkeev, T., Shaniyev, Y., Yerzhanov, E. and Alibekova, G. (2016). Informatics 8. 1st ed. Astana: Астана кітап.

5. Code.org. (2017). Code.org: Anybody can Learn. [online] Available at: http://code.org [Accessed 23 March. 2017].

6. Acmp.ru. (n.d.). АРХИВ ЗАДАЧ. [online] Available at: http://acmp.ru [Accessed 24 Mar. 2017].

7. Informatics.mccme.ru. (n.d.). Дистанционная подготовка. [online] Available at: http://Informatics.mccme.ru [Accessed 20 Mar. 2017].

8. Briggs, J. (2012). Python for kids. San Francisco, California.

9. GCFLearnFree.org. Google Sheets: Creating Simple Formulas - Full Page. [online] Available at: http://www.gcflearnfree.org/googlespreadsheets/creating-simple-formulas [Accessed 17 Mar. 2017].

10. Zapier.com. (n.d.). Google Sheets 101: The Beginner’s Guide to Online Spreadsheets - TheUltimate Guide to Google Sheets - Zapier. [online] Available at: https://zapier.com/learn/google-sheets/google-sheets-tutorial/ [Accessed 16 Mar. 2017].

11. https://www.teamgantt.com/guide-to-project-management/how-to-plan-a-project

12. Intro to Computer Science in Python (Rainforest) codehs.com

13. https://visage.co/11-design-tips-beautiful-presentations/

14. https://business.tutsplus.com/articles/how-to-import-and-export-documents-in-googledrive--cms-20930

15. http://howto.mydiv.net/view-Kak-pravilno-vybrat-programmnoe-obespechenie.html

16. https://en.wikibooks.org/wiki/How_To_Assemble_A_Desktop_PC/Assembly

17. https://www.wikihow.com/Build-a-Personal-Desktop-Computer

18. https://www.sciencebuddies.org/science-engineering-careers/math-computer-science/database-administrator

19. https://www.prospects.ac.uk/job-profiles/database-administrator

20. http://www.shawacademy.com/web-development/different-types-of-databases

21. А.А. Шарипбаев, А.К. Кусаинов, К. Айдарбек, Қ.С. Алдажаров и др., 2014. Казахско-русский, русско-казахский терминологический словарь. Информатика и вычислительная техника. Алматы: “КАЗакпарат”

Content

Ержанов Э и др Informatics 9. Билингвальный учебник