For this exercise you have to construct a web page with a basic calculator. The required features are:
The desired behavior is as follows: the textbox is readonly (it can only be manipulated using the buttons). As long as the user is pressing digits or operation buttons, the corresponding characters are added to the textbox. When the = button is pressed the contents of the textbox are replaced by the result of the expression (you probably want to use eval here). The clear button allows the user to start over.
Value: 5 points.For this exercise you must construct a web page that allows two users to play tic-tac-toe. The required features are:
The players will take turns placing their symbol on the board, with X playing first. The board should be interactive, that is, when a player clicks on a position that position should change to X or O, depending on whose turn it is. For better-looking results you may use images to represent the Xs and Os (this is not mandatory though). The game should not allow illegal moves (e.g. overwriting an opponent's symbol) and should be able to decide when someone has won. This can either be done automatically, after every move, or with a special "Check" button.
Value: 5 points.