Interactive chatbots are taking the world by storm! Are you interested in creating interactive programs but don’t know where to start? Do you have no coding background and want a fun introduction to computer science (CS)? Or, perhaps you are a teacher looking for a structured program to cover the areas in CS, while keeping examples interesting and fresh for your students?
In this book, you will learn basic programming by writing Python programs that mimic interactive chatbots. While this introductory book is not about how to code an advanced artificial intelligence, you will gain skills necessary for basic coding while learning about artificial intelligence concepts such as recommendation systems, computer vision, and big data.

if CONDITIONAL STATEMENT.
Suppose a teacher grades the students on a scale of 100 marks. To pass the examination, a student must secure pass marks (say, 40). Before announcing the results, the teacher decides to moderate the results by giving maximum of two grace marks. Thus, if the student has scored 38 or 39 marks, he or she would be declared to have scored 40 marks. Let us see how script moderate (Fig. 3.1) achieves this.
First, we set passMarks equal to 40 in the function main() (Fig. 3.1). The next statement prompts the user to enter the marks obtained by a student. As marks entered by the user is of type str, we transform it to an integer quantity intMarks using the function intO- In line 23, we invoke the function moderateO defined in lines 1-12 with the arguments intMarks and passMarks. Inside the function moderate() (line 10), we check whether the value of the input parameter marks is less than passMarks by one or two using the condition marks == passMarks-l or marks == passMarks-2. The assignment statement in line 11 gets executed only if the condition evaluates to True. Next, the function moderateO returns marks (possibly modified) to the main() function. The value returned by the function moderate() is assigned to the variable moderatedMarks (line 23). Finally, we print moderatedMarks in line 24. If we run the script in Fig. 3.1, the system responds by asking the marks and displays moderatedMarks.
Contents.
About Pearson.
Title Page.
Contents.
Foreword.
Preface.
About the Authors.
1. Python Programming: An Introduction.
2. Functions.
3. Control Structures.
4. Debugging.
5. Scope.
6. Strings.
7. Mutable and Immutable Objects.
8. Recursion.
9. Files and Exceptions.
10. Classes I.
11. Classes II.
12. List Manipulation.
13. Data Structures I: Stack and Queues.
14. Data Structures II: Linked Lists.
15. Data Structures III: Binary Search Trees.
16. More on Recursion.
17. Graphics.
18. Applications of Python.
19. Data Analysis Using PanDas.
Index Copyright.
Купить .
По кнопкам выше и ниже «Купить бумажную книгу» и по ссылке «Купить» можно купить эту книгу с доставкой по всей России и похожие книги по самой лучшей цене в бумажном виде на сайтах официальных интернет магазинов Лабиринт, Озон, Буквоед, Читай-город, Литрес, My-shop, Book24, Books.ru.
По кнопке «Купить и скачать электронную книгу» можно купить эту книгу в электронном виде в официальном интернет магазине «Литрес», и потом ее скачать на сайте Литреса.
По кнопке «Найти похожие материалы на других сайтах» можно найти похожие материалы на других сайтах.
On the buttons above and below you can buy the book in official online stores Labirint, Ozon and others. Also you can search related and similar materials on other sites.
Хештеги: #учебник по программированию :: #программирование :: #Sheetal :: #Naveen












