Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

program to add first and last digit of a number in python

n = int(input("Enter any number : "))
number = str(n)
first = int(number[0])
last = int(number[-1])
print(f"sum of {first} and {last} is : ",sum)
Comment

PREVIOUS NEXT
Code Example
Python :: Delete file in python Using the shutil module 
Python :: sort dict of dicts by key 
Python :: load data python 
Python :: python variable scope 
Python :: docker opencv python libGL.so.1: cannot open shared object file: No such file or directory 
Python :: conv2 python 
Python :: cannot reshape array of size 2137674 into shape (1024,512,3,3) 
Python :: append 1 colimn in pandas df 
Python :: python capitalize the entire string 
Python :: seaborn boxplot legend color 
Python :: getting size of list in python 
Python :: edit models in django admin 
Python :: pandas value in series 
Python :: flask app with spark 
Python :: Python: Extracting XML to DataFrame (Pandas) 
Python :: text classification 
Python :: how to convert string to datetime 
Python :: python spawn process 
Python :: __dict__ python? 
Python :: python3.8 
Python :: Customize color stacked bar chart matplotlib 
Python :: ipython history 
Python :: print binary tree python 
Python :: pdf to string python 
Python :: python jinja2 from string 
Python :: Using Lists as Queues 
Python :: print dtype of numpy array 
Python :: get data from kaggle to colab 
Python :: how to get session value in django template 
Python :: cholesky decomposition in python 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =