""" These problems are both quite involved - you'll probably only get to one or the other. Pick whichever is more appealing! If you would like help with either of these problems, see me in office hours, or post on Piazza. If you're in office hours at low-traffic hours, one of the LAs will sit down with you to talk through your approach to the problem(s) and offer suggestions. - Michelle """ ############### ### Sorting ### ############### """ A common problem in computer science is figuring out how to sort a list of values from smallest to largest. Write a loop that, given a list named unsorted that contains only integers, sorts the values in the list from smallest to largest, and prints the result. You may not assume the values are unique. Your code should work for any value of unsorted that meets these paramters; we've created a list as an example. """ ## Write pseudocode before attempting this problem - there are many ## sorting algorithms, and you need to figure out which you're using. # If you're stuck, see the Wikipedia pages for bubble sort, insertion sort, # and selection sort. unsorted = [-1, 7, 8, 4, 0, -20, 9, 4, 3] ## YOUR CODE HERE ################### ### Tic-tac-toe ### ################### """ Some of the topics we'll cover in the next two weeks will make this problem way easier, so it might be fun to write a tic-tac-toe game at the end of each week and compare how your approach has changed. Fully expect a massive file to implement this code now - I haven't tried it myself, but I can think of a few ways to make it happen. Design a game of tic-tac-toe that two users can play! """ ## Write pseudocode before attempting this problem - you need to consider: ## - how to represent the board in Python (e.g., what types of variables to use) ## - how to display the board to the users ## - how to track who's turn it is ## - how the user should indicate which cell s/he wants to pick ## - how to determine whether someone won (optional - the users can be smart!) ## - what to do if the users enter invalid input ## - other things?