Programming Challenges 2023-2024

When completing your code challenges keep in mind the four characteristics of quality code…

  1. Functional – Accomplishes it’s task every time.
  2. Readable – Easy for a human to read and edit
  3. Efficient – Executes quickly without unnecessary steps.
  4. Short – Uses the fewest lines of code.

Or put another way…

  1. Does it work? Your code should meet all of the requirements and work in every situation.
  2.  Is it understandable? Your code should be easy for a human to read and understand.
  3. Is it fast? You code should execute and finish as quickly as possible.
  4. Is it short? Your code should be as few line of code as possible.

Submit Your Programming Challenges here. Please make sure your challenge meets all of the requirements before submitting. Also please make sure your app is titled “Programming Challenge #__” to make it extra clear which challenge you have completed.

  1. getDiscriminant(a,b,c) – Given the coefficients of a quadratic, return the discriminant.
  2. getHypotenuse(base, height) – Given the base and height of a right triangle, return the length of the hypotenuse.
  3. getSquarePerimeter(area) – Given the area of a square return the perimeter of the square.
  4. 4 Function Calculator App – Create a basic four function calculator. Remix this template to start. Watch a video example to see how it should work here.
  5. Robot Navigation – Program a robot to navigate through a variety of grids. To make things easier for you I built and IDE here to help you develop your code.
  6. Match Object to Color – Remix the template here. Edit only line 3 so that the app functions as intended.
  7. Will be Hired? – Remix the template here. Write a function willBeHired(age, graduatedCollege, lotsOfExperience, relatedToTheBoss) that returns a boolean value representing whether the applicant should be hired (true) or not (false).  Read the comments at the top of the code for more information about the parameters. The criteria for being hired is below…
    • If you are between the ages of 21-25 and have graduated college you should automatically be hired.
    • If you have graduated college but you are not between 21-25 years old then you must have lots of experience to be hired.
    • However, if you are related to the boss’s family then Ajax will hire you no matter what.
  8. Write a function getRectangleArea(width, height) that returns a numeric value representing the area of a rectangle given the width and height.
  9. Write a function isPositive(num) that returns a boolean value representing whether the number given is positive or not.
  10. Write a function
    getRegularPolygonArea(sideLength, numberOfSides) that returns a numeric value representing the area of a regular polygon given the side length and the number of sides.

    • The formula for the area of a regular polygon is… area=0.5*perimeter*apothem
    • The formula for the apothem is…
      apothem=sideLength/(2*tan(180°/numberOfSides))
    • Note that javascript performs trigonometric functions using radians as input, not degrees. (apothem calculator)
  11. Write a function isSumTen(n1,n2) that returns a boolean value representing whether or not the sum is 10 given two numbers
  12. Write a function getSmallestNumber(n1,n2,n3,n4) that returns a numeric value that represents the smallest number give four numbers.
  13. Write a function isEven(num) that returns a boolean value representing whether the number given is odd or even (hint: use modulo)
  14. Create a 2-Button App. See details here.
  15. Create List App #1. Watch the video. Start by remixing the template.
  16. Create List App #2. Watch the video. Start by remixing the template.
  17. Create List App #3. Watch the video. Start by remixing the template .
  18. Create List App #4. Watch the video. Start by remixing the template.
  19. Create Random Icons. Watch the video. Start by remixing the template.
  20. Create a getAverage(myList) function. Template here.
  21. Create List App #5. Watch the video. Start by remixing the template.
  22. Edit the Three Filters. Start by remixing the template.
    1. Change filter1 to find items that end in the letter “s”
    2. Change filter2 to find items shorter than 6 characters
    3. Change filter3 to find students older than 15
  23. Random Weather Forcaster App (code.org)
  24. Create the Airport App. Watch the video and remix the template. Note, you will need to import the “Busiest Airports” database from the AppLab data library.
  25. Create the Fast Food Calorie App. Watch the video and remix the template. Note, you will need to import the “Fast Food Nutrition” database from the AppLab data library.
  26. Create a removeDuplicates(list) function. The function should return a new list that does not have any duplicates in it.
  27. Create a function addItemToList(sortedList, newItem). The function should take a a sorted list as a parameter and return a new sorted list that includes the new item. See the template here.
  28. Create a alphabetize(list) function. The function should return a new list with all of the items in alphabetical order.
  29. Create the Video Game Search App. Watch the video. Remix the template.

 

 

The Digital Divide

Defining the Digital Divide

Interaction between human and computers has greatly increased as we embark on the twenty-first century. The ability to access computers and the internet has become increasingly important to completely immerse oneself in the economic, political, and social aspects of not just America, but of the world. However, not everyone has access to this technology. The idea of the “digital divide” refers to the growing gap between the underprivileged members of society, especially the poor, rural, elderly, and handicapped portion of the population who do not have access to computers or the internet; and the wealthy, middle-class, and young Americans living in urban and suburban areas who have access.

  1. Why 23 Million Americans Don’t Have Fast Internet – Vox [VIDEO]
  2. Why Many Rural Americans Still Don’t Have Reliable Internet – WSJ [VIDEO]
  3. The Digital Divide Explained – Freethink [VIDEO]
  4. The Digital Divide – On the Media [AUDIO]
  5. Digital Divid Persists – Pew Research [ARTICLE]

 

link 1 2 3 4 5 6 7 8 9