Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python program to add two numbers

#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)
Comment

how to add two numbers in python

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

python program to add two numbers using function

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

add two numbers in 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))
Comment

Python of add two numbers

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

sum = a+b
print(sum)
Comment

python: add two numbers

def add_by_two(numbers):

    return [num + 2 for num in numbers]
    
    
Comment

python how to add 2 numbers

num1 = 2.3
num2 = 1.2
print(num1+num2)
Comment

PREVIOUS NEXT
Code Example
Python :: send message from server to client python 
Python :: python parentheses 
Python :: Write a Python program to count the number of lines in a text file. 
Python :: how to remove a tuple from a list python 
Python :: how to read numbers in csv files python 
Python :: pick a random number from a list in python 
Python :: return max value in groupby pyspark 
Python :: change tkinter app icon 
Python :: what does int do in python 
Python :: heatmap of pandas dataframe with seaborn 
Python :: python program to find largest number in a list 
Python :: get the length of an array python 
Python :: python map string to int 
Python :: python merge pdf files into one 
Python :: how to make a python function 
Python :: python get the length of a list 
Python :: list comprehension python with condition 
Python :: python list all methods of a class 
Python :: how to iterate through a list in python 
Python :: python email 
Python :: pandas check match string lowercase 
Python :: import file from parent directory python 
Python :: how to set variable to null in python 
Python :: merge subplot matplotlib 
Python :: Python JSON API example 
Python :: remove all rows with at least one zero pandas 
Python :: word guessing game python 
Python :: python generator 
Python :: python isinstance list 
Python :: code for python shell 3.8.5 games 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =