1.

Show the blocks to add up a list of numbers. Use a foreach block. Note that your code should work no matter how many items are in the list. You need NOT worry about an event handler or the user interface, just show the blocks for computing the total of all items in the list. Keep in mind that you may use any number blocks you need.

2.

The Factorial function is the product of all positive integers less than or equal to n. For example, for Factorial (5) you multiply the numbers from 1 to 5:
Factorial (5) = 5 x 4 x 3 x 2 x 1 =120
Note that Factorial (1) = 1 and Factorial (0)=1
Your job is to show the blocks for an app in which the user enters a number in a textbox and the app calculates factorial and shows the result in a label. Assume the Button is named FactorialButton, the TextBox is NumberTextBox and the label is ResultLabel. Keep in mind that you may use any number blocks you need.

3.

Describe the difference between a web site and a web service (API). Who does each "serve" and what type of files does each send over the net.

A website serves web pages to a browser (that people view). A web service serves data to another software entity (computer-computer communication). Websites send a human-readable web page typically consisting of HTML, CSS and Javascript files. Web services send just data that is not very human-readability, typically in JSON or XML format.

Show Answer