shukdevdatta123 commited on
Commit
58e4c97
·
verified ·
1 Parent(s): f11f22a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -69,14 +69,15 @@ if sidebar_option == "Introductory Tutorial":
69
 
70
  # Get input array from user
71
  user_input = st.text_input("Enter the array elements separated by spaces:")
 
72
  if user_input:
73
  arr = list(map(int, user_input.split()))
74
 
75
  # Ask the user if they want an animation
76
- animate_option = st.radio("Do you want to see the animation?", ("Yes", "No"))
77
- animate = animate_option == 'Yes'
78
-
79
  # Perform bubble sort and get the steps for animation
 
80
  sorted_array, steps = bubble_sort(arr, animate)
81
 
82
  # Display the sorted array
 
69
 
70
  # Get input array from user
71
  user_input = st.text_input("Enter the array elements separated by spaces:")
72
+
73
  if user_input:
74
  arr = list(map(int, user_input.split()))
75
 
76
  # Ask the user if they want an animation
77
+ animate_option = st.radio("Do you want to see the animation?", options=["Yes", "No"])
78
+
 
79
  # Perform bubble sort and get the steps for animation
80
+ animate = animate_option == "Yes"
81
  sorted_array, steps = bubble_sort(arr, animate)
82
 
83
  # Display the sorted array