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

0

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)
Posted by: Guest on June-19-2021

Code answers related to "program to add first and last digit of a number in python"

Python Answers by Framework

Browse Popular Code Answers by Language