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

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

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

PREVIOUS NEXT
Code Example
Python :: end without space in python 
Python :: pytorch torchaudio torchvision cu113 
Python :: mid point circle drawing 
Python :: python how to add a new key to a dictionary 
Python :: open python file with read write permissions 
Python :: new print on the same line substitution python 3 
Python :: python casting float to int 
Python :: fit function tensorflow 
Python :: sklearn tree visualization 
Python :: foreign key django createview 
Python :: panda loc conditional 
Python :: jacobi iteration method python 
Python :: setup mongodb database with django 
Python :: python black 
Python :: recall at k calculate python 
Python :: access cmd with python 
Python :: how to make python script run forever 
Python :: python ip camera 
Python :: 12 month movinf average in python for dataframe 
Python :: importing python modules from a folder 
Python :: python terminal ui 
Python :: sum range 
Python :: plotly facet_grid python 
Python :: networkx node attribute from a dataframe 
Python :: regex find all sentences python 
Python :: python running mean pandas 
Python :: #Function in python 
Python :: pandas series map 
Python :: how to make a square in python 
Python :: switch case python 3.10 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =