Jul-15-2022, 04:03 PM
This is the output I get when the answer is correct.
The code
Output:enter a country name: africa
africa
a
enter a country name starts with the last letter of previous country name: america
This is the answer I get when the answer is wrong.Output:enter a country name: africa
africa
a
enter a country name starts with the last letter of previous country name: france
enter a country name starts with the last letter of previous country name: germiny
enter a country name starts with the last letter of previous country name:
If you are capitalizing the names, you will have to compensate for that.The code
second_data = 'Wrong answer!'
is just initializing the variable. It could just as well mesecond_data = "z"
.