シンプルなテキスト ベースのゲームを作成していますが、エラーが発生しました。コード内の int を str に変換する必要があります。私のコードは次のようになります。
tax1 = input("You May Now Tax Your City. Will You? ")
if tax1 == "Yes" or tax1 == "yes":
tax2 = input("How Much Will You Tax Per Person In Dollars? ")
if tax2 > 3:
print("You Taxed To High! People Are Moving Out")
time.sleep(1.5)
population -= (random.randint(2, 4))
print("The Population Is Now " + str(population))
time.sleep(1.5)
money += (population * 2)
print("From The Rent You Now Have $" + str(money) + " In Total.")
if tax2 < 3:
print("You Have Placed A Tax That Citizens Are Fine With.")
time.sleep(1.5)
money += (tax2+(population * 2))
print("From The Rent And Tax You Now Have $" + str(money) + " In Total")
これを行うには、コードに何を追加しますか?