Spaces:
Sleeping
Sleeping
Update outerElectronFl.py
Browse files- outerElectronFl.py +2 -4
outerElectronFl.py
CHANGED
@@ -127,7 +127,7 @@ current_country, current_capital = get_random_country()
|
|
127 |
|
128 |
@app.route('/')
|
129 |
def index():
|
130 |
-
return render_template('
|
131 |
|
132 |
@app.route('/quiz_capital', methods=['GET', 'POST'])
|
133 |
def quiz_capital():
|
@@ -155,10 +155,8 @@ def quiz_element():
|
|
155 |
# γ»γγ·γ§γ³γ«ε
η΄ γγͺγε ΄εγ―γ©γ³γγ γ«ιΈζ
|
156 |
if "element" not in session:
|
157 |
session["element"] = random.choice(list(element_outer_electrons.keys()))
|
158 |
-
|
159 |
|
160 |
if request.method == "POST":
|
161 |
-
|
162 |
user_input = int(request.form["user_input"])
|
163 |
correct_answer = element_outer_electrons[session["element"]]
|
164 |
if user_input == correct_answer:
|
@@ -199,4 +197,4 @@ def next_question_element2num():
|
|
199 |
return redirect(url_for("quiz_element2num"))
|
200 |
|
201 |
if __name__ == '__main__':
|
202 |
-
app.run(debug=True, port=7860
|
|
|
127 |
|
128 |
@app.route('/')
|
129 |
def index():
|
130 |
+
return render_template('quiz_index')
|
131 |
|
132 |
@app.route('/quiz_capital', methods=['GET', 'POST'])
|
133 |
def quiz_capital():
|
|
|
155 |
# γ»γγ·γ§γ³γ«ε
η΄ γγͺγε ΄εγ―γ©γ³γγ γ«ιΈζ
|
156 |
if "element" not in session:
|
157 |
session["element"] = random.choice(list(element_outer_electrons.keys()))
|
|
|
158 |
|
159 |
if request.method == "POST":
|
|
|
160 |
user_input = int(request.form["user_input"])
|
161 |
correct_answer = element_outer_electrons[session["element"]]
|
162 |
if user_input == correct_answer:
|
|
|
197 |
return redirect(url_for("quiz_element2num"))
|
198 |
|
199 |
if __name__ == '__main__':
|
200 |
+
app.run(debug=True, port=7860)
|