Spaces:
Runtime error
Runtime error
IsaacKerson
commited on
Commit
•
099856b
1
Parent(s):
4ba37ec
suffle word bank
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import sqlite3
|
|
|
3 |
|
4 |
def add_blanks(word, sentence, blank = "__"):
|
5 |
return sentence.replace(word, blank)
|
@@ -38,7 +39,7 @@ for idx, item in enumerate(c.execute(query, input_tup)):
|
|
38 |
questions.append((idx + 1, word, sentence, add_blanks(word, sentence)))
|
39 |
|
40 |
st.subheader("Word Bank")
|
41 |
-
st.table(chunker(word_bank, 5))
|
42 |
|
43 |
for q in questions:
|
44 |
st.write(f'{q[0]}. {q[3]}')
|
|
|
1 |
import streamlit as st
|
2 |
import sqlite3
|
3 |
+
import random
|
4 |
|
5 |
def add_blanks(word, sentence, blank = "__"):
|
6 |
return sentence.replace(word, blank)
|
|
|
39 |
questions.append((idx + 1, word, sentence, add_blanks(word, sentence)))
|
40 |
|
41 |
st.subheader("Word Bank")
|
42 |
+
st.table(chunker(random.shuffle(word_bank), 5))
|
43 |
|
44 |
for q in questions:
|
45 |
st.write(f'{q[0]}. {q[3]}')
|