Emerging Scholars Program - Week 8

Challenges from last time:

Warm Up

Write in JavaScript the code for finding the minimum of 5 variables, call them a1,a2,a3,a4,a5. You can assume that these variables are given to you. Use the alert() function to display the result. Example: alert('"' + a1 + '" is the smallest number!<br/>');

Computer Science

Last time we created an expert system for determining what parts of computer science you could potentially be interested in. This time you will take the diagram below and translate it into JavaScript. The point of this exersize is to use if, else if, esle statements. The states in bold are end states, and their contents should be output via the alert() function.

A challenge for next time

From my interview with Lawrence Livermore National Labs over this weekend:
You have a bowl with 200 fish in it. Of these fish 99% are not guppies. how many fish should you remove so that 2% of what remains are guppies? Suppose you can distinguish guppies from non-guppies.