“Programa de Python para agregar dos números usando la función” Código de respuesta

Programa de Python para agregar dos números usando la función

num1 = int(input('Enter the first number: '))
num2 = int(input('Enter the second number: '))
def sum_input(num1,num2):
  sum = num1 + num2
  return sum
Siddhant Singh

Programa de Python para agregar dos números

#create two variable to store the user input number
num1 = int(input('Enter the first number: '))
num2 = int(input('Enter the second number: '))
#create a third variable to store the sum of two no.s
sum = num1 + num2
print('The sum of two entered numbers is:', sum)
Enchanting Eel

Cómo agregar dos números en Python

num1 = int(input('any number'))
num2 = int(input('any number'))
print(sum(num1,num2))
Homeless Hamster

Python de agregar dos números

a = int(input("Enter Teh value of a: "))
b = int(input("Enter The value of b: "))

sum = a+b
print(sum)
Smoggy Swan

Agregue dos números en Python

# This program adds two numbers

num1 = 1.5
num2 = 6.3

# Add two numbers
sum = num1 + num2

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
Tender Tapir

Respuestas similares a “Programa de Python para agregar dos números usando la función”

Preguntas similares a “Programa de Python para agregar dos números usando la función”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código