Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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)
 
PREVIOUS NEXT
Tagged: #program #add #digit #number #python
ADD COMMENT
Topic
Name
2+2 =