SHARE
TWEET

Untitled

a guest Dec 14th, 2014 196 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Math Translastions Ex: T<3, 6> on (5, 2) = (8, 8)
  2.  
  3. def pick_corods():
  4.     corods = input("Please input your corods: ")
  5.     return corods
  6.  
  7. def pick_translation():
  8.     translation = input("Please input your translation: ")
  9.     return translation
  10.  
  11. def final_answer():
  12.     corods = pick_corods()
  13.     translation = pick_translation()
  14.     (cro1, cro2) = corods.split()
  15.     (tra1, tra2) = translation.split()
  16.     cro1 = int(cro1)
  17.     cro2 = int(cro2)
  18.     tra1 = int(tra1)
  19.     tra2 = int(tra2)
  20.     final1 = cro1 + tra1
  21.     final2 = cro2 + tra2
  22.     print("Answer: ({}, {})".format(final1, final2))
  23.    
  24. def play_again():
  25.     while True:
  26.         play_again = input("Need another problem solved: ")
  27.         if(play_again.upper() == "Y"):
  28.             print("Loading...")
  29.             return True
  30.         elif(play_again.upper() == "N"):
  31.             print("See you soon!")
  32.             return False
  33.         else:
  34.             print("Error: Please choose either 'Y' or 'N'")
  35.  
  36. while True:
  37.     final_answer()
  38.     if not play_again():
  39.         break
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top