Введение в Python. Вывод данных

1.

Introduction to Python. Output data.
11.1.1.1 organize data output;
11.1.1.2 use the escape sequences with data output.
Assessment criteria:
• Orients through the Python interface.
• Organises data output on Python.
• Uses the escape sequences with data output.

2.

3.

What’s Python?
• https://www.youtube.com/watch?v=Y8Tko2YC5hA

4.

Introduction to Python
Python is one of the leading Object Oriented
Programming Languages.

5.

Why is python’s popularity on the rise?
It is much more concise and expressive language and requires less
time, effort, and lines of code to perform the same operations.
Other reasons are:
Easy to use and learn
Supportive Python community
Numerous libraries
Efficient and fast language
Most Preferred language
Flexible Language
Python in Academics
Automation of tasks
Python is a versatile language

6.

Python’s universality
It’s a onestop shop where I can code virtually anything
Web based applications –Python has Django framework for that
Mobile application – Python has Kivy framework for that
Automations (bots) – Selenium package will come in handy here
AI particularly machine learning – Numerous libraries that make
this process easy.

7.

Python IDEs
Python IDE (Integrated Development Environment) is a software application
that provides a comprehensive environment for Python software
development. It is a one-stop platform that combines various tools and
features to simplify the coding, testing, and debugging processes.
Advantages:
Features:
• Code Editing
• source code editor build
• automation tools
• Debugging Tools
• debugger
• Project Management
• Environment Configuration
• Integrated Terminal
• Code Profiling
PyCharm
Visual Studio Code

8.

How to show the output in Python?
print(value)
Example:
1. print('Hello World')
2. print(123, '56')
3. A = 234
print(A)

9.

Try these code
print(123, 56)
print(789)
print('Hello')
print('World')
What do you notice?

10.

The parameters of print()
print(value1, v2, ..., sep=‘ ‘, end='\n’)
• value: These are the values or expressions you want to print.
Optional:
• sep=‘ ‘: the separator between the values
• end=‘ \n‘: parameter defines what character(s) should be printed at the
end of the print() function

11.

Reflection
How do we output the data?

12.

Individual work: Data Output
Print using print() function and formatting:
• Greeting
• Name
• Age
• Hobby
https://www.w3schools.com/python/

13.

Home Work
• \n:
• \t:
• \b:
Find
the
purpose
of
each
escape
sequences
• \r:
• \f:
Write code for example
• \v:
• \a:
• \ooo:
• \xhh:
• \uXXXX:
• \UXXXXXXXX:

14.

Group Work: Discussion
Why do we need the escape sequence?

15.

Reflection

16.

Additional resources
• https://code-basics.com/ru/languages/python/lessons/escapecharacters#editor
• https://pythonru.com/osnovy/python-print
• https://www.w3schools.com/python/gloss_python_escape_character
s.asp
• https://www.w3schools.com/python/ref_string_format.asp
English     Русский Правила