Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quizzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bmois2
Quizzer
Commits
aa8602a7
Commit
aa8602a7
authored
10 months ago
by
bmois2
Browse files
Options
Downloads
Patches
Plain Diff
Completed 5&6 Pushing for final push.
parent
441c487a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.py
+9
-1
9 additions, 1 deletion
main.py
quizzer.kv
+1
-0
1 addition, 0 deletions
quizzer.kv
with
10 additions
and
1 deletion
main.py
+
9
−
1
View file @
aa8602a7
...
@@ -5,6 +5,7 @@ from kivy.clock import Clock
...
@@ -5,6 +5,7 @@ from kivy.clock import Clock
from
kivy.properties
import
BooleanProperty
,
ListProperty
from
kivy.properties
import
BooleanProperty
,
ListProperty
from
kivy.modules
import
inspector
from
kivy.modules
import
inspector
from
kivy.core.window
import
Window
from
kivy.core.window
import
Window
from
kivy.properties
import
NumericProperty
GUI_QUESTIONS
=
[
GUI_QUESTIONS
=
[
...
@@ -75,7 +76,8 @@ class QuizzerApp(App):
...
@@ -75,7 +76,8 @@ class QuizzerApp(App):
questions
=
ListProperty
([])
questions
=
ListProperty
([])
paused
=
BooleanProperty
(
False
)
paused
=
BooleanProperty
(
False
)
correct
=
BooleanProperty
(
False
)
correct
=
BooleanProperty
(
False
)
score
=
0
#score
score
=
NumericProperty
(
0
)
#score
total
=
NumericProperty
(
0
)
#total questions
def
build
(
self
):
def
build
(
self
):
inspector
.
create_inspector
(
Window
,
self
)
inspector
.
create_inspector
(
Window
,
self
)
...
@@ -126,7 +128,13 @@ class QuizzerApp(App):
...
@@ -126,7 +128,13 @@ class QuizzerApp(App):
print
(
'
correct
'
)
print
(
'
correct
'
)
print
(
self
.
score
)
print
(
self
.
score
)
self
.
score
+=
1
self
.
score
+=
1
self
.
total
+=
1
else
:
self
.
total
+=
1
Clock
.
schedule_once
(
lambda
delta
:
self
.
unpause
(),
PAUSE_TIME
)
Clock
.
schedule_once
(
lambda
delta
:
self
.
unpause
(),
PAUSE_TIME
)
if
self
.
total
==
5
:
self
.
score
=
0
self
.
total
=
0
def
unpause
(
self
):
def
unpause
(
self
):
self
.
paused
=
False
self
.
paused
=
False
...
...
This diff is collapsed.
Click to expand it.
quizzer.kv
+
1
−
0
View file @
aa8602a7
...
@@ -117,6 +117,7 @@ ScreenManager:
...
@@ -117,6 +117,7 @@ ScreenManager:
disabled: app.paused
disabled: app.paused
on_press: app.answer(self.text)
on_press: app.answer(self.text)
# All screens are white.
# All screens are white.
<Screen>:
<Screen>:
canvas.before:
canvas.before:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment