OzoneAsai commited on
Commit
d9b485b
β€’
1 Parent(s): 56c2e81

Update outerElectronFl.py

Browse files
Files changed (1) hide show
  1. 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('index.html')
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,host="0.0.0.0")
 
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)