私のコードでは、2つの答え「反対」と「斜辺」に2つの別々の結果を持たせたいのですが、コードをテストして「反対」と答えると、コードの残りの部分が無視され、「斜辺の質問。私はそれを間違ってフォーマットしましたか/これを行うためのより簡単な方法はありますか/など?
from math import *
def main():
#Trignometry Problem
def answer():
answer = raw_input()
while True:
# Phrase Variables
phrase1 = ("To begin, we will solve a trigonometry problem using sin.")
phrase2 = ("Which is known - hypotenuse or opposite?")
phrase3 = ("Good! Now, we will begin to solve the problem!")
phrase4 = ("Please press any key to restart the program.")
print phrase1
origin=input("What is the origin?")
print phrase2
answer = raw_input()
if answer == ("Hypotenuse.") or ("Hypotenuse") or ("hypotenuse") or ("hyotenuse."):
hypotenuse=input("What is the hypotenuse?")
print "So, the problem is " + "sin" + str(origin) + " = " + "x" + "/" + str(hypotenuse) + "?"
answer = raw_input()
if answer == ("Yes.") or ("yes") or ("yes.") or ("Yes"):
print phrase2
answer = raw_input()
print phrase4
answer = raw_input()
if answer == ("No."):
break
if answer == ("Opposite."):
opposite=input("What is the opposite?")
print "So, the problem is " + "sin" + str(origin) + " = " + str(opposite) + "/" + "x" + "?"
answer = raw_input()
if answer == ("Yes.") or ("yes") or ("yes.") or ("Yes"):
print phrase2
answer = raw_input()
print phrase4
answer = raw_input()
if answer == ("No."):
break
main()