-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanswer.html
35 lines (33 loc) · 1.26 KB
/
answer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% extends 'base.html'%}
{% block title %}Answer{% endblock %}
{% block content %}
<!--Display user's answer and let them know whether it was correct-->
<p>Your answer was <strong>{{user_answer}}</strong>.</p>
<p>The Sphinx expected an answer with the keyword <strong>{{correct_answer}}</strong>.</p>
<p>That means your answer was <strong> {{message}}</strong>!</p>
<hr>
<!--Tells the user their score so far and where they are in the game-->
{% if question_number|int < 11 %} <h5>You have currently answered {{score}} out of {{question_number|int - 1}}
{% if question_number|int - 1 == 1 %}
question
{% else %}
questions
{% endif %}
correctly!
{{11-question_number|int}}
{% if question_number|int == 10 %}
question
{% else %}
questions
{% endif %}
left to go.</h5>
<hr>
{% else %}
<h5>You have currently answered {{score}} out of {{question_number - 1}} questions correctly!</h5>
<hr>
{% endif %}
<form name="answer_redirect" method="POST" action="answer_redirect">
<button type="submit" name="answer" class="btn btn-warning btn-lg">{% if question_number|int < 11 %} Next Question {% else %} Go To Leaderboard {% endif %} </button>
<a href="{{ url_for('write_to_LB') }}" class="btn btn-warning btn-lg">End Game</a>
</form>
{% endblock %}