Java Simple Calculator Program Using Switch

Java Simple Calculator Program Using Switch statement – We will write a simple Java calculator program. This  program will start by taking input from the user – two numbers and one operator. The operator will be from basic four operations like addition, subtraction, multiplication and division (+, – , * , / ). Source Code… Read More »

Loading

Python Temperature Conversion Program

Task: Python Temperature Conversion Program Today, we will learn how to write Python programs to 1. Convert Fahrenheit to Celsius 2. Convert Celsius To Fahrenheit. We will use the following temperature conversion formula: Celsius To Fahrenheit and Fahrenheit to Celsius conversion formulas Python Temperature Conversion Program Celsius and Fahrenheit are the measurement units of Temperature.… Read More »

Loading

Python Code Kilometers To Miles Conversion

Python Program Logic: Python Code Kilometers To Miles Conversion is a program to input a value in kilometers. This Python program then converts the given value of kilometers provided by the user at run time, into miles. How to convert kilometers to miles? Since we know that 1 kilometer is equal to 0.621371 miles: Hence… Read More »

Loading

Python Program Quadratic Equation Roots

Task: Python Program Quadratic Equation Roots, Solution of Quadratic equation, Find roots of quadratic equation. How This Program Works This program uses cmath module and sqrt() builtin function to find the roots of the given quadratic equation when the coefficients a,b and c are given. The popular quadratic equation formula for solving it is as… Read More »

Loading

Python Convert Decimal to Binary Octal Hexadecimal

Task: Python Convert Decimal to Binary Octal Hexadecimal How this Program Works? This Python program will perform number convertion using builtin Python functions. It uses builtin Python functions for number system conversion: bin(int_number) oct(int_number) hex(int_number) Python bin() Function The Python bin() function converts an integer number to a binary string prefixed with 0b . For… Read More »

Loading

Python Simple Calculator Program

Python Simple Calculator Program demonstrates a four function basic calculator. This Python program provides the functionalities of:  Addition  Subtraction  Multiplication and  Division of two numbers. Code for Simple Calculator Program # This is a simple Python program # to design a simple 4 function # calculator using if -elif- else # define functions def add(x,… Read More »

Loading