

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


For this assignment you are to create a plain text file called hw1.txt which is to contain answers to each of the following questions; please remember to clearly label each problem. (You can use Notepad, emacs, or any other text editor you are familiar with to create and edit the hw1.txt file.) For the first several problems you need only indicate that the task has been successfully performed, or explain any problems that prevented you from doing so. For the remaining problems you are to provide code and/or written answers. You are to submit this file electronically. (Instructions will be provided on the news and the policies page shortly.)
(a) List four well-known computer languages that are compiled but (generally) not inter- preted. (b) List four well-known computer languages that are interpreted (whether or not they can also be compiled). (c) List four well-known computer languages that are considered to be object oriented.
(a) Construct a tiny Python program that contains a syntax error due to an incorrect token. Describe what Python prints in response. (b) Construct a tiny Python program that contains a syntax error due to a grammatical error; i.e. tokens that are not ordered corretly. Describe what Python prints in response. (c) Construct a tiny Python program that contains a semantic error; i.e. a program that runs but does not do what it is “intended” to do. (Of course, you will need to describe what the “intention” was, and what the program does instead.)
which it returns as its function value. Verify the values returned for both functions are very close to one another for positive values of x that are strictly less than 1. (What happens when x > 1?)
Please remember to include the standard six-line header at the top of your hw1.txt file!