Python Forum
If 2nd input in the game is correct, replace with 1st input and loop the game
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If 2nd input in the game is correct, replace with 1st input and loop the game
#6
This is the output I get when the answer is correct.
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 codesecond_data = 'Wrong answer!'is just initializing the variable. It could just as well mesecond_data = "z".
Reply


Messages In This Thread
RE: If 2nd input in the game is correct, replace with 1st input and loop the game - by BashBedlam - Jul-15-2022, 04:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] adding mouse control to game flash77 5 449 May-14-2024, 04:51 PM
Last Post: flash77
  get a game to run in full screen mode agencyclearly 1 353 May-12-2024, 11:23 AM
Last Post: menator01
  Game "Fluppy bird" nastia_nadashkevich 1 367 Apr-19-2024, 08:45 PM
Last Post: deanhystad
  [PyGame] Waiting screen until user input - PiBooth world90 2 1,105 Apr-19-2024, 03:34 AM
Last Post: attractalderman
  Isometric game pygame Tiled howardberger 1 751 Jan-31-2024, 10:01 PM
Last Post: deanhystad
  I want to add a bullet function to my game. how would i go about it? Iyjja 5 1,106 Jan-09-2024, 05:42 PM
Last Post: Iyjja
  GPS Points to map for game/simulator AvgPlum 2 2,022 Jun-22-2023, 06:38 PM
Last Post: marynetherton
  [PyGame] When I hit the space bar from the home screen, it sends me to the game over screen JesusisKing 1 1,091 Apr-30-2023, 10:11 PM
Last Post: deanhystad
  Laggy Game Movement game_slayer_99 12 4,650 Oct-05-2022, 11:34 AM
Last Post: metulburr
  can't get collision detection to work in platform game chairmanme0wme0w 10 4,010 Aug-19-2022, 03:51 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020