Posts

Showing posts from July, 2023

#15 Python Tutorial for Beginners | Python BitWise Operators

  #15 Python Tutorial for Beginners | Python BitWise Operators Welcome, and in this series on Python, we will be focusing on bitwise operators. Bitwise operators are used to manipulate binary numbers, which can be useful when working with money formats or other applications. Let's dive right in! The Complement Operator (~) The tilde (~) symbol is used to represent the complement operator in Python. The complement of a binary number is obtained by flipping all the bits (0s become 1s and 1s become 0s). For example, the complement of 12 is -13. Example: ~12 = -13 To understand why the complement of 12 is -13, we need to understand the concept of two's complement. In computer systems, negative numbers are stored in two's complement form. To find the two's complement of a number, we find the one's complement (flip all the bits) and then add 1 to the result. Example: 12 in binary: 1100Complement of 12: 0011Two's complement of 12: 1101 (which is -13 in decimal) Try dif

#14 Python Tutorial for Beginners | IDLE Previous Command | Clear Screen?

Image
#14 Python Tutorial for Beginners | IDLE Previous Command | Clear Screen? How to Access Previous Commands in IDLE? When working with Python, we often write a lot of code. But what happens when we want to access the same command again? In IDLE, there is no default option to access previous commands. However, you can configure it by following these steps: Go to Options Select "Configure IDLE" Click on "Keys" Scroll down and find "History Previous" Select the up arrow as the shortcut key Click "OK" Now, to access the last command, simply press the up arrow. It's important to note that clearing the screen is not possible in IDLE. The only way to do it is by closing and reopening the program. If you know of a hidden script or technique, please share it in the comments below. Thanks for Reading! https://www.highwaycpmrevenue.com/ka9ix7e0t?key=4807923f98c12e085b5d0cf16291fdec

IDLE Previous Command | Clear Screen?

Image
  #14 Python Tutorial for Beginners | IDLE Previous Command | Clear Screen? How to Access Previous Commands in IDLE? When working with Python, we often write a lot of code. But what happens when we want to access the same command again? In IDLE, there is no default option to access previous commands. However, you can configure it by following these steps: Go to Options Select "Configure IDLE" Click on "Keys" Scroll down and find "History Previous" Select the up arrow as the shortcut key Click "OK" Now, to access the last command, simply press the up arrow. It's important to note that clearing the screen is not possible in IDLE. The only way to do it is by closing and reopening the program. If you know of a hidden script or technique, please share it in the comments below.

#13 Python Tutorial for Beginners | Swap 2 Variables in Python

  #13 Python Tutorial for Beginners | Swap 2 Variables in Python Welcome back aliens! My name is 720 and in this blog post, we'll see how to swap two numbers in Python. Let's say we have two variables, 'a' and 'b', with the values 5 and 6 respectively. How do we swap these two values? Normally, in different programming languages, we have different ways of implementing this, but one thing is common in most languages - we have to use a third variable to swap them. For example, if we try to print the values of 'a' and 'b' after swapping them without using a third variable, we will see that the values are not swapped correctly. So, the common approach is to use a temporary variable. We save the value of 'a' in the temporary variable, then assign the value of 'b' to 'a', and finally, assign the value of the temporary variable to 'b'. This way, the values are swapped correctly. However, this approach wastes a variable. B