reply = input( 'Enter two numbers: ' ) r, c = reply.split() r = int( r ) c = int( c ) total = r + c print( total ) # How do you go from a two-digit number to just have the ones place? # String Way: # i.e. 12 -> 2 (the last digit of the number) # i.e. 17 -> 7 (the last digit of the number) # Is there a way we can use Python to just get the last digit of the number? # How can we do it mathematically? # THIS IS HOW TO GET THE LAST DIGIT USING THE % (MODULUS) OPERATOR # YOU WANT TO DO THIS FOR THE NEXT HW (digit_box) last_digit = total % 10 # remainder of total / 10 # 12%10 is 12/10 = 1 remainder 2 which is just 2 since % gives us the remainder! print( last_digit )