Category Archives: Python Programming Language

Python Program Factorial Three Versions

Python Program Factorial Three Versions – This Python tutorial explains three different source codes of the Python factorial program. Write a program that asks the user for a number and prints out the factorial of that number: Using  factorial() function of math module Using for loop Using while loop The Python has a math module.… Read More: Python Program Factorial Three Versions »

Loading

Inches to Centimeters Python Program

Inches to Centimeters Python Program – This Python Tutorial provides the source code of Inches to centimeters conversion program in Python programming language. The source code of Python Program to Convert Inches to Centimeters # Write a program that asks the user # to enter height in inches. # The program should convert it to… Read More: Inches to Centimeters Python Program »

Loading

Kilograms to Pounds Python Program

Kilograms to Pounds Python Program – This is a Python program to enter Kilograms by the user, and the program will convert it into pounds and show the result. How to Convert Kilograms into Pounds (Kgs to Lbs) We can easily convert the given kilograms in to the pounds using the following formula: 1 Kg… Read More: Kilograms to Pounds Python Program »

Loading

Python math Functions

Python math Functions – This Python tutorial will explain the use of Python math functions in Python Programs with example Python scripts and their output. What is a Python math Module? The Python programming language has a math module. The math module contains different functions for general math calculations. What are different math functions? There… Read More: Python math Functions »

Loading

Python range Function in for loop

Python range Function in for loop – this python tutorial will explain the purpose and use of Python range() function especially in for loop. The Use of Python range Function in for loop The range function The range() function creates the sequence of numbers for you. When using the range() function, you specify the start,… Read More: Python range Function in for loop »

Loading

Python print function – Printing Output

Python print function – Printing Output – This Python tutorial will explain the use of Python print() function for showing the output on screen in different ways. What is print() function in Python Python print() function is used as an output statement in Python programs. Example of print() function Here is a simple example: print(… Read More: Python print function – Printing Output »

Loading

Python input function to Get User Input

Python input function to Get User Input – This Python tutorial will explain the use of Python input() function to get the input from a user during execution. Getting input frrom the User The input function is a built-in function in Python. It is a simple way for your program to get input the users… Read More: Python input function to Get User Input »

Loading

Python Decimal to Hexadecimal Conversion Program

Python Decimal to Hexadecimal Conversion Program – This Python tutorial will explain the actual logic to convert a decimal number to corresponding hexadecimal number. It will also explain the important statements of the Python program for conversion of decimal to hexadecimal number. How to Convert Decimal to Hexadecimal Number We know that the hexadecimal number… Read More: Python Decimal to Hexadecimal Conversion Program »

Loading

Python Decimal to Octal Conversion

Python Decimal to Octal Conversion – This tutorial explains the logic of decimal number to octal number conversion process. It also explains the Python code to convert a dcimal nuber into octal number. How to Convert a decimal Number to Octal Number We divide the decimal number by base 8 and get the quiotient and… Read More: Python Decimal to Octal Conversion »

Loading

Python Decimal to Binary Converter

Python Decimal to Binary Converter – This Python tutorial explains the logic to convert a decimal number into its corresponding binary number. How To convert a Decimal Number into Binary Number We divide the decimal number by base 2 and get the quiotient and remainder.  Example: divide 5 by 2, quotient1 is 2 and remainder1… Read More: Python Decimal to Binary Converter »

Loading