Category Archives: Programming (en)

[C language] Introduction: Programming Exercises

I’m taking lessons from Stephen Prata’s book “C Primer Plus”. I have a book from 2000, which is very relevant to me, since the project I plan to work on adheres to the ANSI C standard. But in the process … Continue reading →

Posted in C language (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

Python: lifehacks for setting up a programming environment

Once you’ve installed Python on your computer, it’s best to take care of the little nuances that make life easier for programmers. Let’s go through the basic settings of the programming environment and Windows for comfortable work: 1. Changing System … Continue reading →

Posted in Python (en) | Leave a comment

Python: Basic Text Input and Output Operators

The very first text operations and basic information about Python that helps you start programming right away: # Comments Delimiters ” or “” and escaping characters \’ and \” print(‘Hello world’) – newline end=’…’ – next print will be glued … Continue reading →

Posted in Python (en) | Leave a comment

How to write Python code in Notepad++

If you love Notepad and want to program with it, then in the case of the Python programming language, you need to use a special plugin. There are several plugin options for Notepad++ that interpret Python: nppexec; Python script; PyNPP.

Posted in Python (en) | Leave a comment

Python – loops (for, while, break, continue)

Loops in Python are pieces of code that repeat multiple times. range(start,stop,step) – this is how the forLoop loop looks in general, where start and stop describe the actual beginning and end of the loop, including the start point, but … Continue reading →

Posted in Python (en) | Leave a comment

Python – ternary conditional statement (if, or, else)

Ternary operator (Ternary operator) – used in line to set conditions in assigning a value to a variable. It is easier to understand this with examples. cat_say = “Mew” me_say = “Hi,cat” if cat_say == “Mew” or cat_say == “Myavki” … Continue reading →

Posted in Python (en) | Leave a comment

Python – Boolean Operators and Conditions

Basic conditions in Python: < (one less than the other) > (one more than the other) <= (one is less than or equal to the other) >= (one is greater than or equal to the other) != (one is not … Continue reading →

Posted in Python (en) | Leave a comment

Python – branching structures (if else, if, ifelif statements)

The if statement (if) is used to set conditions (if so, then…), for example: cat_say = ‘mew’ if cat_say = ‘mew’ of cat_say = ‘myavki’: ….print(‘Dear, cat! Here’s your food!’) Important: when using if conditions, you need to write double … Continue reading →

Posted in Python (en) | Leave a comment

Python – using format in strings

Inside the string, we can specify both fixed text and part of the text defined by the format function, which will consist of separately specified sections: print(“This cat has {0} kittens and a {1}”.format(2,”tail”)) Instead of using numbers inside curly … Continue reading →

Posted in Python (en) | Leave a comment

Python – strings, string concatenation and repetition

To assign a string to a variable, enclose the test either in apostrophes ‘…’ or in double quotes “…”: string=’I am a cat’ string=”I am a cat” If the string contains an apostrophe (I’m), then the entire string must be … Continue reading →

Posted in Python (en) | Leave a comment

Python – programming environment and additional programs

When you have installed Python, the question arises – how to start learning this language? Should I write commands through the console or do I need to install something else on the computer? There are many programming environments and solutions … Continue reading →

Posted in Python (en) | Leave a comment

Python – installation

To install Python on your computer, simply search Google for download python and follow the first link to www.python.org/downloads The easiest way is to click on the bright button with the latest version of Python and then follow the installation … Continue reading →

Posted in Python (en) | Leave a comment

Python – forbidden variable names

To find out which names cannot be given to variables in Python, use the command: import keyword keyword.kwlist For Python 3.6 this words are:

Posted in Python (en) | Leave a comment