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

Write a simple python program that adds 2 numbers togethe

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:UsersUSER>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:34:34) [MSC v.1928 32 bit (
Intel)] on win32
>>> x = 5
>>> y = 10
>>> print(x + y)
15
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 :: how to get only certain columns in pandas 
Python :: how to enable execution time in jupyter lab 
Python :: sparse categorical cross entropy python 
Python :: pyinstaller command 
Python :: python print utf-8 
Python :: how to convert a byte array to string in python 
Python :: ternary operator python 
Python :: python [remote rejected] master - master (pre-receive hook declined) 
Python :: pytorch l2 regularization 
Python :: Insert missing data in pandas 
Python :: connection to server at "" (), port 5432 failed: timeout expired 
Python :: get list file endswith python 
Python :: joblib 
Python :: pandas read column in date format 
Python :: check pygame version 
Python :: fill null values with zero python 
Python :: get user ip address django 
Python :: pass variable in subprocess run python 
Python :: isidentifier method in python 
Python :: django query field is null 
Python :: how to make a class in python 
Python :: merge dictionaries in python 
Python :: python divisors 
Python :: python with file 
Python :: api in python 
Python :: plotly heatmap with label 
Python :: how to count the number of files in a directory using python 
Python :: numpy array_equal 
Python :: replace character in string python 
Python :: negative index in python list 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =