CSCE Home
Home
Syllabus
Schedule
Homework
Labs
Projects
Review
Students
Instructor
CS home
PLU home

Computer Science and Computer Engineering 115
Solve it with the Computer!
Spring 2000

Homework

Last update: April 20, 2000

Previous assignments


Practice problems for HTML
  1. What tag (or tags) would you use for the following:
    1. Start a list numbered 1, 2, 3, ...?
    2. Draw a horizontal line?
    3. Start a new line at the left margin without putting in a blank line?
    4. Put in a title for your page that will be printed inside the window in large type?
    5. Start printing text that is 3 sizes larger than currently be used?
    6. Start the section containing text that is to be shown inside the browser window using yellow standard text and an image named blueweave.jpg for the background?
    7. Begin a new row in a table?
    8. Print the following text in bold italics?
  2. Write all the text needed to accomplish the following:
    1. Make a link to the file Practice.html by allowing the user to click on "Practice problems"
    2. Insert the image MyPainting.gif in your page. The image is 180 by 150. Should the image be unavailable, insert the words "My painting" instead. Print the words "My self-protrait" to the right of the picture before starting a new line.
    3. Create the following list
      • Susan
      • Mary
      • Tom
    4. Explain the difference between <HEAD> and <H1>. (It is not adequate to only say that <H1>results in larger text.)
    5. Explain the difference between relative and absolute references in a hyperlink.
    6. Explain each part of this URL: http://www.cs.plu.edu/courses/csce115/spring00/hwk5.html

    Thursday, April. 27: Homework 8: Expected value problems (15 points)
    1. A spinner on kids game has 5 equal areas marked 2, 6, 3, 1, 5.
      1. What is the probability of spinning a 3?
      2. What is the expected point value of spinning?
    2. There are 20000 tickets in a raffle for a trip for 2 to Disneyland that is worth $4000. You brought one ticket. One ticket is picked at random to win the trip.
      1. What is the probability that you win?
      2. What are the odds that you win?
      3. What is the expected value of your ticket?
      4. Assume raffle organizations decided to add 20 second prizes of a sweat shirt each worth $25. What would be the expected value of the ticket?
    3. A new electronic game uses a 10 sided die with faces numbered from 1 to 10. Assume each side is equally likely. Players roll 1 "die" to determine what happens.
      1. What is the probability of rolling a 6?
      2. Players win $16 if they roll a 2 and $6 dollars if they roll at least a 6. Otherwise they win nothing. What is the expected value of rolling a "die" in this game?
      3. Assume that players are charged $5 each time they roll a die How much does the dealer expect to make on the average (fee charged - expected pay out per roll.)?
      4. If dealer manages to get players to pay for 2000 rolls, how much does the dealer expect to earn?
      5. What are the odds of rolling a 2?
      6. What are the odds of rolling either a 6 or more?
      7. Is the game a "fair" game?
    4. A hot dog manufacturer is trying to decide whether it is worth while to give free samples at a supermarket. Each free sample costs the company $0.12. Experience has shown that when customers take free samples, there is a 40% probability they buy nothing, 30% probability that they buy one package, 20% probability they buy two packages, 5% change they buy three packages and 5% probability they buy 4 packages.
      1. On the average, how many boxes do they expect to sell to each customer taking a free sample?
      2. If the profit on each package sold is $0.25, can the company expect to recover the price of the free samples?