Homework Hacks

  • Write an algorithm in python that uses a function to sort 4 numbers from lowest to highest.
  • What are 3 benefits and 1 negative of using a simulation
  • Think of social media platforms that you go on. What is an aspect of one of those platforms that uses an algorithm to improve their feature and usability?
arr = [4,1,2,3]
arr.sort()
print(arr)
[1, 2, 3, 4]

Benefits:

  • efficient, saves money, risk-free testing

Negatives

  • can lack accuracy, and over simplify

question 3

  • Tiktok has a for you page which is an algorithm that is used to give the user access to videos that are similar to what they like and their previously watched videos
  • the algorithm detecs, watch times, share, and likes to reccomend personalized videos on the for you page