Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#create a list of fruits
fruits = ['apple', 'banana', 'cherry']

print(fruits)
22 changes: 22 additions & 0 deletions streamlit_test1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import streamlit as st

if 'test_history' not in st.session_state:
st.session_state.test_history = []


text_input = st.text_input('Enter some text')

subnit_button = st.button("submit")
if subnit_button:
st.session_state.test_history.append(text_input)

st.write("you have submitted:", text_input)
st.session_state.input_box = "" # Clear the input box

clear_button = st.button("clear history")
if clear_button:
st.session_state.test_history = []
st.write("history cleared")
st.write("Past inputs")
for test in st.session_state.test_history:
st.write(test)
23 changes: 23 additions & 0 deletions students.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"students": [
{
"id": 1,
"name": "Alice",
"age": 20,
"grades": {
"math": 90,
"science": 85
}
},
{
"id": 2,
"name": "Bob",
"age": 22,
"grades": {
"math": 75,
"science": 80
}
}
]
}