coderz.py

Keep Coding Keep Cheering!

Math Functions in Python

Python allows us to perform a variety of mathematical operations with ease by importing a module called “math,” which is used to access mathematical functions. These methods are only applicable to integer or real-type objects, not complex numbers. Types of pre-defined functions: Python has two kinds of pre-defined functions. Inbuilt functions: These are functions that […]

November 13, 2022 | python | No comments

Python Mathematical Operators

Mathematical Operators: Mathematical Operators are used in mathematics to perform operations such as addition, subtraction, multiplication, and division. Python has seven arithmetic operators: Addition Subtraction Multiplication Division Modulus Exponentiation Floor division Addition: The addition operator in Python is +. It is used to combine two values. Example: Output: Subtraction: The subtraction operator in Python is […]

November 13, 2022 | python | No comments

Python Syntax Rules & Hello World Program

Python Syntax Rules: Here are a few things you should know beforehand: Python is case-sensitive, which means, for example, Name and name have different meanings The standard is to use English names in programming All variables should start with a lowercase letter, for example,  var = 4 Functions begin with lowercase Classes begin with a capital letter  There is no command […]

November 12, 2022 | python | No comments

Swap Two Numbers Without Using Third Variable

By using the + and – operators, we can swap two numbers without using a third variable. Main logic: Program code: Output: Note: also read about Check for palindrome number Follow Me Please follow me to read my latest post on programming and technology if you like my post. https://www.instagram.com/coderz.py/ https://www.facebook.com/coderz.py

November 12, 2022 | C++ | No comments

Check for palindrome number

A palindrome number is a number that remains the same when digits are reversed. For example, the number 125521 is a palindrome number, but 1451 is not. Program Logic: First, Declare a variable reverseNum and initialize it with 0. Now, make a while loop till the original number is greater than zero. In every loop, get the last digit […]

November 12, 2022 | C++ | No comments

Find Max Number Among the Given Three Number Using If/Else Statements

n1 is compared to n2. If n1 is larger than n2, it is compared to n3. If it is greater than n3 as well, n1 is the max number; otherwise, n3 is the max number. If n1 is not greater than n2, it follows that n2 is greater than n1. After that, n2 is compared to n3. […]

November 11, 2022 | C++ | No comments

Check for Prime number

A prime number is greater than one and can be divided by one or itself. In other words, prime numbers cannot be divided by anything other than themselves or 1. Prime numbers include 2, 3, 5, 7, 11, 13, 17, 19, 23, etc. Program code: Output: Note: also read about Diamond Pattern Using Numbers Follow Me […]

November 11, 2022 | C++ | No comments

Python 2 vs. Python 3

Python is one of the programming languages that has boosted the world of technology to new heights. Python 2 and Python 3 were the two major versions of Python that were introduced to the world. Even though they are both different versions of the same programming language, there are significant differences between the two, and […]

November 11, 2022 | python | No comments

Introduction to Python IDLE

What is Python IDLE? Python IDLE is an acronym that stands for Integrated Development and Learning Environment. is a very simple and sophisticated IDE designed primarily for beginners, and it is highly regarded and recommended for educational purposes due to its simplicity. Features of IDLE: It has the following key features: Syntax highlighting in Python […]

November 8, 2022 | python | No comments

Diamond Pattern Using Numbers

Program code: Output: Note: also read about Floyd’s Triangle Follow Me Please follow me to read my latest post on programming and technology if you like my post. https://www.instagram.com/coderz.py/ https://www.facebook.com/coderz.py

November 8, 2022 | C++ | No comments

Advertisement