Ics 215 Final Exam Solution

Submitted by: Submitted by

Views: 10

Words: 621

Pages: 3

Category: Other Topics

Date Submitted: 09/29/2015 12:53 AM

Report This Essay

ICS 215 Final Exam Solution

https://hwguiders.com/downloads/ics-215-final-exam-solution

ICS 215 Final Exam Solution

a. In Python, give an example of defining a new regular expression object that exactly matches

the string “Python” only.

b. In Python, what is the main difference between a list and a tuple?

c. What is the equivalent of Perl’s for each in Python?

d. What is one main advantage of PHP over Perl for server-side scripting of dynamic web

pages?

e. In PHP, how can you tell what is a variable?

It always begins with a $

f. In JavaScript, how do you redirect the current window to a different location?

g. In JavaScript, how would you get the first 9 digit substring of the string str\?

h. In Perl, write a search program fragment to match periods followed by one or more white

space characters fol lowed by a capitalized word.

i. In Perl, what is the simplest way to set the value of the key ‘chin’ to be ‘David N. Chin’ in the

hash %uhunix_accounts?

j. Name two key differences between scripting languages and systems programming languages .

2. Better Web App Development (2 pts)

In Sean Kelly Õs screen cast comparing different web development languages and framework :

a. What was the problem with developing user interfaces in C++ (be specific)?

b. What did he call having to set lots of parameters in XML files?

3. Perl scripting (3 pts)

Write a Perl subroutine called unique_name that takes as arguments a file name and a directory path that ends in the correct directory separator (Ò/Ó or Ò\Ó) and returns a non -conflicting file name. If the file name does not exist in the directory path, then the original file name is returned. If it does exist, modify the file name by adding different integers (starting from 1) to the base of the file name until a file name is found that does not exist in the path, e.g. document.doc would become document1.doc, then document2.doc, etc.

JavaScript (3 pts)

Write an...