Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Quiz/Game
#4
(Nov-17-2018, 09:43 AM)j.crater Wrote: Hello, the "break" on line #39 should probably be indented. Now the break is always encountered on first for loop iteration.

else:
                print("\n Wrong! Try Again\n")
                print("Attempt",count)
                count += 1
                break
Tried putting inside the else and It always repeat to the 1 question when false. Thanks

(Nov-17-2018, 05:35 PM)woooee Wrote:
    while count < 3: 
        for i in range (0,3):
Both of these statements do the same thing. They both access the first 3 questions.

Any idea how can I retain the same question if it's wrong?
Reply


Messages In This Thread
Basic Quiz/Game - by searching1 - Nov-17-2018, 07:12 AM
RE: Basic Quiz/Game - by j.crater - Nov-17-2018, 09:43 AM
RE: Basic Quiz/Game - by searching1 - Nov-17-2018, 06:10 PM
RE: Basic Quiz/Game - by woooee - Nov-17-2018, 05:35 PM
RE: Basic Quiz/Game - by ichabod801 - Nov-17-2018, 06:36 PM
RE: Basic Quiz/Game - by searching1 - Nov-18-2018, 02:25 AM
RE: Basic Quiz/Game - by ichabod801 - Nov-18-2018, 02:37 AM
RE: Basic Quiz/Game - by searching1 - Nov-18-2018, 02:56 AM
RE: Basic Quiz/Game - by ichabod801 - Nov-18-2018, 03:10 AM
RE: Basic Quiz/Game - by searching1 - Nov-18-2018, 03:31 AM
RE: Basic Quiz/Game - by ichabod801 - Nov-18-2018, 03:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  quiz game - problem with loading statements from file lapiduch 2 1,189 Apr-20-2023, 06:13 PM
Last Post: deanhystad
  Code: Creating a basic python game? searching1 5 3,580 Nov-12-2018, 05:18 AM
Last Post: searching1
  help setting questions and answers in quiz game? yoyoitsjess 3 3,785 May-10-2018, 07:35 AM
Last Post: buran
  Quiz Game Help (ASAP Please!) beginnercoder04 2 3,285 Apr-15-2018, 04:13 AM
Last Post: beginnercoder04

Forum Jump:

User Panel Messages

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