About 31,000,000 results
Open links in new tab
  1. addition - How to add and subtract in python - Stack Overflow

    Feb 25, 2014 · number_1 = int(raw_input("What is the first number you want to add? ")) number_2 = int(raw_input("What do you want to add to it? ")) sum = number_1 + number_2 print sum

  2. Subtract Two Numbers in Python - GeeksforGeeks

    May 14, 2025 · Subtracting two numbers in Python is a basic operation where we take two numeric values and subtract one from the other. For example, given the numbers a = 10 and b …

  3. Python Program to Make a Simple Calculator

    In this example you will learn to create a simple calculator that can add, subtract, multiply or divide depending upon the input from the user.

  4. Python Program to Perform Addition Subtraction ... - CodesCracker

    Python Program to Perform Addition Subtraction Multiplication Division - In this article, we've created some programs in Python, that performs addition, subtraction, multiplication and …

  5. Python program to do arithmetical operations

    Oct 7, 2019 · In this Python program, we will create a simple calculator that performs basic arithmetical operations such as addition, subtraction, multiplication, and division. The user can …

  6. Python Program – Addition, Subtraction, Multiplication & Division

    Dec 10, 2021 · It’s fairly simple to do mathematical operations in Python, here I will show you a simple example: Python #Addition add = 5 + 2 print ("Addition: %d" %add) #Subtraction sub = …

  7. Python Arithmetic Operators - Scaler Topics

    Apr 9, 2024 · Primarily, Arithmetic Operators in Python are of the following types- Now, let’s take a closer look at them and try to understand them better. 1. Addition. The addition operator in …

  8. Python Program to Add Two Numbers

    In the program below, we've used the + operator to add two numbers. Example 1: Add Two Numbers # This program adds two numbers num1 = 1.5 num2 = 6.3 # Add two numbers sum …

  9. How to make a python calculator with that can add , subtract , multiply ...

    Jun 20, 2020 · def add(x, y): return x + y def subtract(x, y): return x - y def multiply(x, y): return x * y def divide(x, y): return x / y num1 = float(input("Enter a number :")) op = input("Enter your …

  10. Python - how to add and subtract elements in array

    If I have an array, let's say: np.array([4,8,-2,9,6,0,3,-6]) and I would like to add the previous number to the next element, how do I do? And every time the number 0 shows up the addition …

  11. Some results have been removed
Refresh