Skip to main content

Posts

Showing posts from 2022

Operators in Python

Hello Pythonist, here in this post I wiould like to share you about the all Python operators how they can coperates on the literals and variables at different sinarios. Unlike any other Programming languages,  Python supports wide variety of operators. Logical operators Comparison operators Bitwise operators Let's explore more ... Logical Operators The Python Logical operators are simple English words  and  or  not All these above operators returns boolean values based on the combination of operands. Comparison operators There are several comparison operators as >, <, >=, <=, ==, !=  Also in operators Bitwise Operators Binary number 0 and 1 will be used as operands bitwise operators & | ^ and ~ allow us to manipulate single bits of data and they returns 0 or 1 based on the data bit values passed. Python Bit-wise Operators Bit shift operators Left bit-shift operator << Right bit-shift operator >>

Python Basics Literals and Variables

Literals Python Variables Python can do any athematic calculations but to bring it to a meaningful representation, reusability and easy referencing a value we use variable. Valid variable names A variable name can be combination of letters, numbers, and underscore. The variable name must start with either letter or underscore symbol. No other symbol or numbers allowed in the first character. Example variable names: server_name total_servers cpu_load_average server10_mem_size The Variable name defined in lower case is different that defined with upper case, they are created at different memory locations. cpu_load_average not same as CPU_load_average mem not same as MEM Invalid Variable definations We should not use any type of operator symbols in defining the variable. Here is some variables defined throws errors c@paci+y ~ not valid @ and + total_@f_server ~ using @ not valid 10thserver ~ initial number not allowed W...

Introduction to Python Orientation

Python Building Blocks Hello everyone, Python enthusiast let me start about how we began this blog, Started learning Python from Pavan we (Sujith, Purushotham) and started noting the class and then looking into several web stuff and also into Python e-books. Once we got summary thought of sharing the idea of what we had learned about each topic as one blog post. This can continue for the next students as well anyone can share this and comment on this post. this blog posts are specially intended for newly started Python  Programming.  Re-editing : 06-Mar-2022, As I've looked at PCEP Practice exam some of the basic info that I recollected updated here in this below section. Re-edited it on 21-03-3023  Little about Python History Python came from British comedy group "Monty Python" TV show. In Feb1991 Python first release version came. Python was designed and developed by Guido Van Rossum . The Python major implemented languages are:  CPython ,  PyPy ...