Advertisement
STANAANDREY

EX1 LSD

Sep 30th, 2022
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def last_digit(x):
  2.     return x % 10
  3.  
  4. if __name__ == "__main__":
  5.     x = int(input("x="))
  6.     print("last digit of %d is %d" % (x, last_digit(x)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement