Lecture 7
Lecture 9
Lecture 10
Lecture 7 part 2
Lecture 13
100
How many bytes are in a pixel?
3 bytes, Red, Green, and Blue
100
what are the 6 basic elements of programs?
Output Variables Iinput Calculations Decisions Repetition
100
what does
stand for?
line break
100
what does GIF PNG JPG SVG stand for?
graphics interchange format portable network graphics joint photographic experts group scaleable vector graphics
100
what is a key and what is a value?
key=what we know value=what we are searching for
200
What colour is this? 255 255 000
Yellow
200
What is source code?
text for computer programs that give them a function
200
what is the ending tag for ?
200
what are some strengths and weaknesses of GIF?
Pros: Great for images with limited number of colours (like drawings), The only widely-supported animated image format Cons: On most photographs, loses image data in a noticeable way (lossy), Lingering patent discomfor
200
what keys are on the right and left of the top node in binary search trees?
left=lesser than right=greater than
300
What does TUF stand for and how is it formatted?
Totally Uncompressed Format first 4 bytes=hight and width every other collection of 3 bytes is a colour (pixel)
300
who is Brendan Eich?
Primary author of the JavaScript at Mozilla
300
put Mattie, Gordon, and Jake in an ordered list with bullet points

The Three Musketeers:

  1. Mattie
  2. Gordon
  3. Jake
300
pros and cons of PNG?
Pros: • Often better compression than GIF ▫ Though sometimes worse • Good support for transparency • Makes combining images easier • Lossless!! cons: • Various animation proposals, but none standard and supported by a lot of browsers • Achieves good, but not great compression ratio on photograph
300
when are tries efficient?
when there is dense branching in autofill in text and search engines
400
How do you mirror an image horizontally? vertically? decrease size? pixelate?
Store the pixels in inverse order in each row Store the rows in inverse order Store only even numbered row group 4X4 and find the average colour
400
What is going on here? name = prompt("What is your name?"); yearOfBirth = prompt("What year were you born in?"); ageTurning = 2013 - yearOfBirth; document.write("Hello, "); document.write(name); document.write("!
You will be turning "); document.write(ageTurning); document.write(" this year, if you haven’t already.");
text box: what is your name? text box: what year were you born in? perform calculation 2013-yearOfBirth write: Hello, eg Gordon! You will be turning 20 this year if you haven't already.
400
how do you include a link in HTML?
400
pros and cons of JPEG?
pros:• Awesome image compression for photographs • Virtually no noticeable loss of image quality on photographs cons:• Compression artefacts on other image types • Should not be used as primary format when doing image manipulation
400
how are heaps organized?
the first node possesses the highest value and then each node has children with a lower value
500
how do we find how many bytes are in a TUF file?
4+3XwXh=bytes in the file
500
express this algorithm in words: number=Math.floor(Math.random()*9 + 1); guess=prompt("I have a number from 1 to 9. Guess it."); numGuessesLeft=6; while ((numGuessesLeft > 0) && (guess != number)) { if (guess"); } else { document.write("Wrong! All your guesses are used up.
"); } document.write("The number was: " + number); 44
1. Pick a random number between 1 and 9 2. Ask user to guess it 3. Set number of guesses left to 6 4. Repeat as long as user has not guessed number yet, and number of guesses left is greater than 0: 1. If last guess was too high, tell user it is too high and give them another guess 2. Otherwise, tell user it is too low and give them another guess 5. Tell the user whether they’ve guessed correctly 6. Tell the user the number
500
how do you place an image in HTML?
500
pros and cons of SVG
pros:scaleable and take up very little space cons:very simple geometric patterns
500
what are stack effective for?
games with backtracking applications that need others to run