Category Archives: Python (en)

What do you program in Python? Real-world applications with library examples

When I started learning Python, I got curious about what people write in this language. If you look at it from a general perspective, it seems like Python is used everywhere – it’s such a super universal language that you … Continue reading

Posted in Python (en) | Leave a comment

Python: string generation with concatenation

Task is to generate 50 strings of such kind: hello 1 world hello 2 world hello 3 world hello 4 world … Tried such clumsy way (I forgot Python really):

Posted in Python (en) | Leave a comment

Python OOP – Object Oriented Programming

We continue to practice programming. After the eighth chapter in the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I learned the principles of OOP and program objects / classes, … Continue reading

Posted in Python (en) | Leave a comment

How to rename a file extension in Python

Task: there is a file with the .raw extension in the folder and I need to rename this file to the same one, but with a different .txt extension – how can I do this? Solution: You need to import … Continue reading

Posted in Python (en) | Leave a comment

Python: Problems and Solutions (Chapter 7 Files and Exceptions Quiz Game)

We continue to practice programming. After the seventh chapter in the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I learned how to work with files, it’s time to move … Continue reading

Posted in Python (en) | Leave a comment

Python Error: inconsistent use of tabs and spaces in indentation

When running the code, a syntax error occurs – inconsistent use of tabs and spaces in indentation. What does this mean and how to solve this problem? The fact is that python enforces uniformity in the use of spaces, which … Continue reading

Posted in Python (en) | Leave a comment

Python: Problems and Solutions (Chapter 6. Functions. Tic-Tac-Toe Game).

We continue to practice programming. After the sixth chapter in the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I learned how to use functions, it’s time to move on … Continue reading

Posted in Python (en) | Leave a comment

Python: non-standard functions. Game “Tic-tac-toe”.

We continue to learn the Python programming language Python. Let’s move on to chapter 6 “Functions. Tic-Tac-Toe Game” from the book: Michael Dawson “Python Programming”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition) to create our own … Continue reading

Posted in Python (en) | Leave a comment

Python: Problems and Solutions (Chapter 5 Lists and Dictionaries Hangman Game).

We continue to practice programming. After the fifth chapter in the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I learned how to make dictionaries and use lists, it’s time … Continue reading

Posted in Python (en) | Leave a comment

Python: Lists and Dictionaries

We continue to learn the Python programming language Python. We turn to the study of chapter 5 of the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where we will master … Continue reading

Posted in Python (en) | Leave a comment

Python: Problems and Solutions (Chapter 4. For Loops, Strings, and Tuples. The Anagram Game).

We continue to practice programming. After the fourth chapter in the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I learned how to use the for statement and create tuples, … Continue reading

Posted in Python (en) | Leave a comment

Python: for loops, constants, slices, tuples, sequences len, range, in, choice

We continue to learn the programming language. Let’s move on to chapter 4 of the book: Michael Dawson “Python Programming”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where we will study loops with the for () … Continue reading

Posted in Python (en) | Leave a comment

Python: Problems and Solutions (Chapter 3. Branching, while Loops, and Pseudocode. Guess the Number Game).

We continue to learn programming. After the third chapter in the book: Michael Dawson “We Program in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I studied the features of working with text in the … Continue reading

Posted in Python (en) | Leave a comment

Python: if, elif, else branching, while loops, random number generation

We continue to learn programming. Let’s move on to the study of the third chapter of the book: Michael Dawson “Programming in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where we will study if, elif, … Continue reading

Posted in Python (en) | Leave a comment

Python: Challenges and Decisions (Chapter 2. Types, Variables, and Basic I/O. Useless Facts Program).

We continue to learn programming. After the second chapter in the book: Michael Dawson “We Program in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I studied the features of working with text in the … Continue reading

Posted in Python (en) | Leave a comment

Python: Challenges and Solutions (Chapter 1. Getting Started. The Game Over Program).

We continue to learn programming. After the second chapter in the book: Michael Dawson “We Program in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I studied the features of working with text in the … Continue reading

Posted in Python (en) | Leave a comment

Python: data types and the input() function

There are several data types in the Python programming language, for example: integers int(x), for example, 1-2-3-4; fractional numbers float(x), for example, 1.0-2.0-3.5; str(x) strings, which can contain text and other characters. The input() function has already been discussed earlier, … Continue reading

Posted in Python (en) | Leave a comment