|
|
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
- What tag (or tags) would you use for the following:
- Start a list numbered 1, 2, 3, ...?
- Draw a horizontal line?
- Start a new line at the left margin without putting in a blank line?
- Put in a title for your page that will be printed inside the window in large type?
- Start printing text that is 3 sizes larger than currently be used?
- 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?
- Begin a new row in a table?
- Print the following text in bold italics?
- Write all the text needed to accomplish the following:
- Make a link to the file Practice.html by allowing the user to click on "Practice problems"
- 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.
- Create the following list
- Explain the difference between <HEAD> and <H1>. (It is not adequate to only
say that <H1>results in larger text.)
- Explain the difference between relative and absolute references in a hyperlink.
- 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)
- A spinner on kids game has 5 equal areas marked 2, 6, 3, 1, 5.
- What is the probability of spinning a 3?
- What is the expected point value of spinning?
- 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.
- What is the probability that you win?
- What are the odds that you win?
- What is the expected value of your ticket?
- 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?
- 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.
- What is the probability of rolling a 6?
- 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?
- 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.)?
- If dealer manages to get players to pay for 2000 rolls,
how much does the dealer expect to earn?
- What are the odds of rolling a 2?
- What are the odds of rolling either a 6 or more?
- Is the game a "fair" game?
- 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.
- On the average, how many boxes do they expect to sell to
each customer taking a free sample?
- If the profit on each package sold is $0.25, can the
company expect to recover the price of the free samples?
|