About 1,940,000 results
Open links in new tab
  1. sum of two numbers coming from the command line

    Aug 31, 2009 · Here is the program to take two numbers as command-line arguments (while invoking the script) and display sum (using python): import sys a= sys.argv[1] b= sys.argv[2] …

  2. Python Project: Summing Up Two Numbers from User Input

    Mar 31, 2025 · Write a Python script that asks the user for two numbers, converts them to integers, sums them up, and prints the result. Expected Output: The program should ask for …

  3. Write a program that asks for any two numbers and displays their sum

    Jun 7, 2024 · In this program, we can use Python to ask the user for two numbers and then display their sum, difference, and product. Python code snippet: num1 = float(input('Enter first …

  4. Program to find the sum and difference of two numbers

    Jan 29, 2024 · Given two Integers A and B, your task is to find the sum and difference of two numbers. Examples: Input: A = 4, B = 9 Output: Sum = 13 and Difference = -5 Input: A = -3, B …

  5. Write a program to input two numbers. Print their Sum, Difference

    Feb 3, 2022 · We have taken two user input to accept two numbers from the user and stored them as int function. Then we have calculated sum, difference and product of the both numbers …

  6. write a program in python to accept two | StudyX

    Feb 11, 2025 · write a program in python to accept two numbers from the user and display their sum, difference, product and quotient. This involves fundamental mathematical operations …

  7. Python Calculation of the sum, difference, product, quotient of two numbers

    Mar 12, 2021 · Write a program in Python with 2 text fields (Text), 4 radio buttons (RadioButton) and a button (Button). 2 numbers are written in the text box. By clicking on the button, a …

  8. Python 3: Basic arithmetic operations - Stack Overflow

    Sep 21, 2013 · I am trying to write a program to perform simple arithmetic operations. I want the program to prompt the user for two numbers, and then calculate five results: the sum; the …

  9. How to Print Sum of Two Numbers in Python - Know Program

    How to Print Sum of Two Numbers in Python. This is the simplest and easiest way to print the addition program in Python. We will take two numbers while declaring the variables and find …

  10. Python program to find difference of two numbers

    Oct 31, 2022 · Program to find the difference of two numbers in Python. Here we are going to accept two int value from user and then perform subtraction. Please check our video tutorial …

Refresh