Welcome to Lost Fortune!
Please answer the following questions for your personalized adventure:
Enter the number of Explorers:
17
Enter the number of Explorers Lost in Battle:
13
You bravely led 17 adventurers on a quest for gold.
The group fought a band of ogres and lost 13 members.
Only 4 survived.
My code
print("Welcome to Lost Fortune!")
print("Please answer the following questions for your personalized adventure:")
print("Enter the number of Explorers:")
x = input()
valx = float (x)
print("Enter the number of Explorers Lost in battle:")
h = input()
valh = float (h)
print("You bravely led {}.".format(valx)
("adventurers on a quest for gold."))
print("The group fought a band of orges and lost{} members.".format(valh)
I did the same thing with a different code and it worked fine. Why is this one not working?

New Topic/Question
Reply



MultiQuote









|