Vinay Garg Assistant Professor

Blog

#python

Posts tagged python.

Python

Lesson 10: Bitwise operators

Bitwise operators work on the individual bits of a number, not on the number as a whole. Six of them — and, or, xor, not, shift left and shift right — with 5 and 3…

2 min read

Python

Lesson 7: All the arithmetic operators

Seven operators do all the arithmetic in Python: add, subtract, multiply, divide, floor divide, remainder and power. One short program shows each one, plus the…

2 min read

Python

Lesson 6: Type conversion in Python

Type conversion changes a value from one type to another so it can be used. int(), float(), str() and bool() cover almost every case, and each one has a rule worth…

2 min read