I am making a single player guessing game on capital cities, where the country and the first letter of the capital city are displayed and the user has 2 guesses to input the correct answer.
In an external .txt, I have the countries and cities stored, where they are separated by a '-'. Here is an example of how they are formatted:
England - London
France - Paris
India - New Dehli
Say the 2nd line was randomly selected, I want the program to output this:
"The country is France and the first letter of the capital city is P. Try and guess!"
Any help would be appreciated! :)