3.1: Section 3 Assessments
- Page ID
- 45734
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Section 3 Assessments
For each of these assignments, complete each step and submit all files (PHP, CSS, scripts, images, etc.) necessary by zipping and submitting your assignment folder.
Your First PHP
- Comment your name and assignment number at the top of the file.
- Create a variable that contains the current date and time.
- Create a constant that contains the assignment title.
- Make the assignment title the title of the page using the constant.
- Output the date and time.
- Output the PHP version, and server operating system (use system references).
- Display the following string as shown:
- “Chicken finger subs are the best!” said Clyde.
- “I agree”, said Bill, “but only when they are extra hot.”
- Calculate and display the following. Use variables for each value used in the equation:
- 8 + 9 = 17
- 24 % 8 = 0
- 5 / 3 = 1.667
Forms and More
- Create a website which presents the user with a registration form for a subscription service. Your form should request the following information:
- First, last name
- Occupation
- Email address
- Mailing address
- Phone
- Job Title
- All information should be hidden (i.e., not be shown in the address bar).
- Name, email, and mailing address fields should be required.
- When completed, the form values are stored in a unique text file for each submission.
- The user should see a confirmation that their submission was received.
What Time Is It?
- Create an HTML page and complete the following with JavaScript only.
- Output the current date and time to the screen.
- Convert local time and date to UTC and display the result.
- Add a button to your page that updates these times.
Let’s Play A Game!
- Create a page with a 3 by 3 grid to represent a tic-tac-toe board.
- Using jQuery, assign an X or O (alternating back and forth) when a cell is clicked on.
- Include a button to reset the board after a game.
- Using canvas, put a colorful gradient of the words Tic-Tac-Toe at the top of the page.
Discussion / Written Response
- How are tags in XML different from tags in HTML?
- What is the difference between single and double quoted strings in PHP?
- What is the difference between server side and client side scripting? What are good situations to use each?
- What is the difference between GET and POST?
- Describe the difference between notice, warning, and critical error messages in PHP.
- Describe the difference between include, require, and require once.
Questions
Take this quiz online!
- The array $array = (“One”=>1, “Two”=>2, “Three”=>3) is numeric.
- True
- False
- Which equation equates to 14?
- 4 + 5 2 - 4
- (4 + 5) 2 – 4
- 4 + 5 (2 - 4)
- 4 + (5 2) – 4
- The foreach() function in PHP is used when dealing with:
- Strings
- Arrays
- Objects
- Lists
- Which PHP reserved array holds values passed in the URL?
- $_POST
- $_GET
- $_SESSION
- None of these
- Which of the following is NOT a valid variable name?
- $variable
- $string
- $_string1
- $and-then
- Which of the following is an incorrect definition?
- Apache = Web Server
- PHP = Object oriented language
- MySQL = Database Server
- HTML = Operating System
- Which of the following PHP functions runs until a condition is met?
- foreach()
- while()
- during()
- None of these
- Declaring strings using single quotes means PHP syntax in the string will be shown.
- True
- False
- Which HTML element is used for JavaScript?
- <scripting>
- <javascript>
- <jscript>
- <script>
- Where can we place JavaScript?
- <head>
- <body>
- A & B
- None of these
- JavaScript and Java are the same thing.
- True
- False
- DOM stands for
- Document Object Model
- Document Oriented Media
- Document Object Manager
- None of these
- When a user views a page containing a JavaScript program, which machine actually executes the script?
- The user’s browser
- The Web server
- Both
- None of the above
- Which of the following cannot be done with JavaScript?
- Validating a form
- Sending a form’s contents by email
- Storing the form’s contents to a database file on the server
- None of the above
- Which of the following is not a valid JavaScript variable name?
- 1stname
- _firstName
- FirstName
- None of these
- What is the correct JavaScript syntax to write “Hello World”?
- System.out.println(“Hello World”)
- println (“Hello World”)
- document.write(“Hello World”)
- response.write(“Hello World”)
- jQuery uses CSS selectors to interact with page elements.
- True
- False
- In jQuery, $(‘div’) would select
- The first div element
- All div elements
- An element named div
- Which jQuery function makes sure the contained code only runs when the page is done loading?
- $(body).onload()
- $(document).loaded()
- $document.ready()
- None of these
- jQuery is an add-on library for JavaScript, not an independent language.
- True
- False


