Monday, May 25, 2020

A Python function that receives a three digit no and return the ones place value?

def ones_place_value(a):
    b =a%10;
    return b;


val= int(input("enter three digit number\n"))
c=ones_place_value(val)
print(c)

No comments:

Post a Comment

python class topic video