Question #348339

first and last digit
output:print the first digit in first line and second digit in second line
input 1:1456
output:1
       6
input 2:9821
output:9
       1

Expert's answer

#The second solution, if our input values are necessarily a int
a = int(input('write numbers'))
b = a % 10
c = str(a)
print(f'{c[0]} \n{b}')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS