Answers for "adding numbers on the first part of the 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
0

adding the first place value and second value in python

two_digit_number = input("Enter a two digit number:- ")
first_Digit = int(two_digit_number[0])
second_digit_number = int(two_digit_number[1])
calculation = first_Digit + second_digit_number
print(calculation)
Posted by: Guest on July-27-2021

Code answers related to "adding numbers on the first part of the number in python"

Python Answers by Framework

Browse Popular Code Answers by Language