Monthly Archives: July 2019

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

Python Convert Binary Number to Decimal

Python Convert Binary Number to Decimal – This Python tutorial gives the basic logic to convert a binary number into its corresponding decimal number. The image number 1 shows the whole binary to decimal number conversion process . The Python source code to convert a binary number into decimal # This Python script / program… Read More: Python Convert Binary Number to Decimal »

Loading

Convert Binary to Decimal C Plus Plus

Task: Write a Program To Convert Binary to Decimal Number in C++ Te Source code of C++ Program To Convert Binary to Decimal Number // Write a C++ program to input a binary number, // and convert into correspondin Decimal number #include<iostream> #include<math.h> using namespace std; int main() { long int binNum,rem,n,i,decimal; cout<<“Enter a Binary… Read More: Convert Binary to Decimal C Plus Plus »

Loading

Python Ternary Operator or Conditional Expressions

Python Conditional Expression is also called Ternary Operator. It is an alternative to a simple Python if else statement. Syntax of Python Ternary Operator or Conditional Expressions x  if   C   else   y Where x is a simple Python expression or statement. The C represents a given condition. The y represents another simple… Read More: Python Ternary Operator or Conditional Expressions »

Loading

Python for Loop Syntax Plus Examples

Python for loop Statement Syntax Plus Examples – This is a Python tutorial to explain the syntax and use of for loop with different practical examples in Python scripts. Python for Statement We can use a Python for statement for two main puposes: Use a for loop to iterate over items in a sequence Using… Read More: Python for Loop Syntax Plus Examples »

Loading