Intro to Python

Theory

This course will focus on learning programming using the Python language . This is a modern programming language that works on all common operating systems.

Currently, there are two versions of the Python language: the older, but still more widespread version 2 and the modern version 3. They are not completely compatible with each other: a program written for one version of the language may not be executable for another version. But basically both versions are very similar.

We will use version 3 of this language, some of the examples used will not work with version 2. The latest version of the languageis what you need to install at home by downloading this version from the website www.python.org.

You can start the python interpreter from the command line:

$python3

Be careful - the python command will launch version 2 interpreter, which we will not work with. On Windows, you can use the menu item “Python (command line)”

You will see a command prompt similar to the following: 

Python 3.1.2 (r312:79147, Jun 12 2010, 15:29:06)
[GCC 4.4.3 20100316 (ALT Linux 4.4.3-alt2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Feel free to enter the commands and enjoy the results. What can you enter? A few examples:

>>> 2 + 2
4
>>> 2 ** 100
1267650600228229401496703205376
>>> 'Hello' + 'World'
'HelloWorld'
>>> 'ABC' * 100
'ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC ABCABCABCABCABCABCABCABCA BCABCABCABCABCABCABCABCABCABCABCABCABC ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC'

The first command calculates the sum of two numbers, the second command calculates 2 to the power of 100, the third command performs the concatenation operation on the strings, and the fourth command prints the string 'ABC' repeated 100 times.

Want to finish working with Python? Enter the command exit() (exactly, with parentheses, since it is a function), or press Ctrl+D.

Problems


Subscribe to receive updates!

Be up-to-date with our recent updates, new problems and answers!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Our courses

Where do you hold your classes?
We hold our classes online or on-site on Saturdays at our branch in Pimlico Academy, London.
You can find our timetable here.
What do you need to start learning online?
For lessons you only need a computer or phone with a microphone, camera and Internet access. Wherever you are - in London, Nottingham, New York or Bali - online lessons will be at hand.
When can I take the introductory lesson?
You can get acquainted with the school at any time convenient for you. To do this, just leave a request and sign up for a lesson.
I can't attend class, what should I do?
It is OK, it happens! Students have the opportunity to cancel a lesson up to 8 hours before the scheduled time without loss of payment. So you can reschedule it for a convenient time, and the teacher will have the opportunity to
I don't have much free time, will I have time to study?
Learning can take place at your own pace. We will select a convenient schedule and at any time we will help you change the schedule, take a break or adjust the program.
How long is one lesson?
All classes last 1 hour.
Hear from some of our amazing students who already achieved incredible results with us!
"Olympiad Maths Lessons helped me a lot to get the Gold medal in Junior Maths Challenge"
St. Paul's Student
"Thanks to the 'Data Science' and 'Coding in Python' lessons I got accepted to my dream university."
Michael
Data Science Student
Warwick University
"Great courses, which thoroughly explained topics beyond the capability of the GCSE answer sheet. Thanks so much."
Ivan
GCSE Student in Dubai
"Financial Mathematics! Best course to understand Python and Mathematics behind Finance!"
Gleb
VC Investor
"We got silver in PMC! Thanks George!"
Mum of St. Paul's Student
Prepare for the Primary Maths Challenge
"My daughter took a batch of 10 classes with George to understand Python with Turtle. I found George extremely knowledgeable and accessible."
Dad of Latymer School Student
Python with Turtle
We’re hiring!

Meet our team

Our teachers will tell you how to prepare for exams, help you cope with difficult tasks and win the Olympiad

They will tell you about the pitfalls of exams and the most common mistakes, and explain how to avoid them
George Ionitsa
Founder &
Teacher of Maths and Coding