review package

23
Review Package Winter 2014 Overview This Review Package was created by the CS 100 Instructional Support Assistants. It is based on all the course material, some of which you may have seen on previous assignments. Make sure to study the material before you start on this package. Also, be sure to note that this package is not intended to be a sample or practice exam, but to supplement your own studying. We strongly encourage you to try to complete this package without any outside help. Good Luck! Section 1: Excel 1. List the parameters and provide a brief explanation of the following functions. VLOOKUP INDIRECT

Upload: uwaterloo

Post on 20-Jan-2023

5 views

Category:

Documents


0 download

TRANSCRIPT

Review Package Winter 2014

 

Overview This  Review  Package  was  created  by  the  CS  100  Instructional  Support  Assistants.  It  is  based  on  all  the  course  material,  some  of  which  you  may  have  seen  on  previous  assignments.  Make  sure  to  study  the  material  before  you  start  on  this  package.  Also,  be  sure  to  note  that  this  package  is  not  intended  to  be  a  sample  or  practice  exam,  but  to  supplement  your  own  studying.  We  strongly  encourage  you  to  try  to  complete  this  package  without  any  outside  help.    Good  Luck!    

Section 1: Excel 1. List  the  parameters  and  provide  a  brief  explanation  of  the  following  

functions.    VLOOKUP  

 INDIRECT  

   

 CONCATENATE  

 IF  

 COUNTIF  

 MID  

 

2. Explain  the  differences  between  a  relative  cell  reference  and  an  absolute  cell  reference.  When  and  why  is  it  useful  to  name  particular  cells  and/or  ranges?    

 3. FEDS  Swag  Sale  

The  Federation  of  Students  (FEDS)  is  having  a  Swag  Sale  where  students  can  purchase  various  items  of  clothing  to  show  their  school  spirit.  To  help  keep  track  of  their  orders  and  sales,  FEDS  uses  an  electronic  spreadsheet.      The  various  clothing  types  on  sale  are:  Hoodies,  Cardigans  and  T-­‐shirts.  Students  can  buy  all  three  items  for  a  reduced  price  (HCT  Combo).  Students  who  purchase  their  “swag”  before  16-­‐Jan-­‐2013  pay  an  “Early  Bird  Price”.  In  addition  to  this,  students  who  volunteer  with  a  FEDS  service  get  $5  off  regardless  of  what  they  buy  and  the  date  of  their  purchase.      FEDS  offers  a  free  pair  of  Malibu  sunglasses  for  every  purchase  of  a  HCT  Combo.    FEDS  uses  a  just-­‐in-­‐time  inventory  system  in  which  they  place  orders  for  their  swag  items  as  soon  as  they  are  purchased.  The  items  are  then  made  available  for  students  to  pick  up  once  they  arrive.  Take  a  few  moments  to  study  the  spreadsheet  screenshot  on  the  following  page,  and  answer  the  questions  that  follow.    

     

 

 a. Name  cells  and  range  where  appropriate  (this  may  be  easier  to  complete  as  you  

work  through  the  rest  of  the  questions.)    

Name   Cell/Range  

 

   b. Cell  F14  indicates  whether  or  not  the  student  receives  a  free  pair  of  Feds  Malibu  

Sunglasses.  Create  a  formula  that  does  this.  Your  formula  should  be  able  to  fill  down  to  F22.  

 c. Cell  G14  displays  the  volunteer  discount  amount  to  be  applied.  Create  a  formula  that  

makes  this  calculation.  Your  formula  should  be  able  to  fill  down  to  G22.  

 d. Cell  H15  displays  the  Purchase  Price  to  be  paid  by  the  student.  This  should  account  

for  the  Early  Bird  discount  and  the  volunteer  discount.  Enter  the  formula  that  would  make  this  calculation.  The  formula  should  be  able  to  fill  down  to  H22.  

 e. Range  B26:B29  summarizes  the  purchases  made.  Enter  a  formula  in  B26  which,  

when  filled  down  to  B29,  displays  the  number  of  purchases  made  for  each  clothing  type.  

f. Range  H26:H31  summarizes  the  purchases  made  by  each  faculty.    Enter  a  formula  in  H26  that  displays  the  number  of  “swag  packages”  purchased  by  each  faculty.  

 g. The  spreadsheet  keeps  a  track  of  the  number  of  sunglasses  remaining  in  stock  after  

each  purchase.  Create  a  formula  which,  when  entered  in  cell  B33,  will  display  the  number  of  sunglasses  that  are  left  in  stock.  

 h. Identify  the  type  of  chart  used  to  depict  the  share  of  purchases  by  each  faculty.  

 i. What  is  the  corresponding  data  range  for  the  chart?  

 j. If  Annie  Z  changes  her  faculty  from  AHS  to  Arts,  what  components  of  the  

spreadsheet  will  change?  

   

k. Explain  how  the  spreadsheet  that  FEDS  uses  is  in  accordance  with  the  “good  design  principles”  outlined  in  module  3.3.  

   

4. Rearranging  Names  Use  the  screenshot  below  to  answer  the  following  questions:  

   

a. Enter  a  formula  in  cell  C2  that  would  display  the  full  name  as  depicted  in  the  above  screenshot.  This  formula  should  work  when  filled  down  to  C10.  

 b. Enter  a  formula  in  D2  that  would  generate  a  code  as  follows:  The  first  initial  of  the  

first  name,  followed  by  the  length  of  the  last  name,  followed  by  the  first  initial  of  the  last  name.  The  formula  must  work  when  spread  down  to  C10.  

 c. Enter  the  formula  in  E2  that  would  create  a  rearranged  version  of  the  name  using  

the  following  syntax:  “First  name  initial.  Last  name”  

     

Section 2: HTML For  the  exam,  you  will  need  to  know  various  HTML  tags  in  order  to  effectively  write  the  HTML  code  for  a  webpage.    The  HTML  tags  you  should  know  have  been  listed  in  the  Midterm  Review  package.      Listed  below  are  a  few  points  that  you  should  keep  in  mind  while  writing  the  HTML  code  for  a  webpage:    

• HTML  tags  are  not  case  sensitive    • Tags  are  usually  paired,  they  have  an  opening  tag  and  a  closing  tag  (ex.  

<title>  Final  Review  Package  </title>)    • Paired  tags  surround  the  text  that  is  to  be  affected    • Paired  tags  can  be  nested  within  one  another  (ex.  <b>  <i>  …  </i>  </b>)    • HTML  codes  should  always  begin  with  the  <html>  tag  and  can  be  followed  

by  <head>  and  <body>  tags        Review  Questions    1.  Write  the  HTML  code  for  the  following  examples  in  the  space  provided.        a)  Old,  but  I’m  not  that  old;  Young,  but  I’m  not  that  bold.  

         

b)  Counting  Stars  has  been  their  first  Top  10  Hit  since  their  single  Apologize.  (The  website  for  Counting  Stars  is  http://www.countingstars.com)    

         

c)  Other  songs  from  the  album  Native,  include:    • What  You  Wanted  • If  I  Lose  Myself  • Feel  Again  

     

 

 

 

2. Consider  the  following  screenshots  of  a  webpage:    

 

 

Show  the  HTML  code  for  this  webpage.  Assume  that  the  hyperlink  labeled  “Kyle  Lowry”  leads  to  http://www.kylelowry.com,  the  hyperlink  labeled  “tickets”  is  http://www.tickets.com,  the  email  link  is  [email protected],  and  the  image  name  is  Raptors.jpg.    

Section 3: Wikitext 1. In  the  following  table,  fill  in  the  second  column  with  the  appropriate  wikitext  to  form  the  

end  result  shown  in  column  3.    

Tag

Code End Result

Bold   Module 8

Italics   Hello

Level  2  heading   CS 100

Level  3  heading   CS 100 Rocks!

Table      Table  Header          Table  Rows  

Play   Year  Macbeth   1603  Hamlet   1599  

Internal  Link  (to  Alberta  page)  

AB

External  Link  (to  Wikipedia  page)  

Wikipedia

Email  Link  (to  [email protected])  

Jane Smith

Category  Link   Category: Cities in Ontario

Bulleted  list     • One • Two

• Two point one

• Three

Numbered  list   1. One 2. Two

1. Two point one

3. Three

 2. This  is  a  wiki  page  on  the  biography  of  Betty  White.    

 

Write  out  the  Wiki  text  that  would  create  the  page  above.  Assume  the  hyperlink  labeled  “Ugly  Betty”  leads  to  http://www.uglybetty.com.  Also,  the  email  address  used  for  the  contact  information  is  [email protected].    

3. Differentiate  between  a  disambiguation  page  and  a  redirect  page.  Show  the  wiki  signatures  to  create  these  pages.        

 

 Section  4:  Boolean  Logic  and  Querying      1.    For  following  Venn  diagrams,  give  the  query  that  would  return  pages  represented  by  the  shaded  areas:    

     

               

                   

             

 

 

 

2.   Using  the  Venn  diagram  below,  indicate  which  sections  would  be  filled  in  by  the  following  queries:  

 a)   (Eggs  AND  NOT  Toast)  OR  (Bacon  AND  NOT  (Eggs  AND  Toast))    

b)   Eggs  OR  Toast  OR  Bacon)  AND  NOT  ((Eggs  AND  Toast)  AND  NOT  Bacon)    

 c)   Eggs  XOR  Toast  XOR  Bacon  

 

 

   

 

Section 5: Web Searching and Indexing Computer    -­‐-­‐>  6   Rocks    -­‐-­‐>  6   Science  -­‐-­‐>  13  Pg2;  4:12,  32,  45,  65   Pg2;  4:  15,  40,  51,  80     Pg1;  5:  5,  23,  54,  63,  123  Pg5;  3:  8,  23,  54     Pg5;  3:  10,  36,  71   Pg2;  2:  10,  14  Pg8;  4:  3,  11,  23,  63   Pg8;  4:  5,  18,  42,  69   Pg4;  4:  3,  4,  17,  43    Pg13;  3:  9,  24,  48   Pg13;  3:  13,  33,  55   Pg8;  3:  4,  32,  70    Pg22;  3:  22,  29,  33   Pg22;  3:  24,  35,  37   Pg9;  4:  13,  31,  45,  68    Pg28;  4:  1,  11,  14,  43   Pg33;  3:  30,  51,  70   Pg13;  4:  3,  10,  26,  51         Pg17;  3:  24,  28,  44       Pg19;  5:  9,  10,  32,  44,  76         Pg20;  2:  32,  45         Pg22;  3:  23,  30,  38         Pg27;  4:  4,  19,  32,  73         Pg29;  5:  10,  17,  24,  28,  44       Pg32;  3:  32,  44,  56        1.  Provided  the  above  information,  find  the  resulting  postings  list  when  searching  for  all  occurrences  of  the  phrase  “Computer  Science  Rocks”  

 2. Consider  the  following  hypothetical  “page”  of  text.  Where  she  sits  she  shines,  and  where  she  shines  she  sits.  Show  the  detailed  postings  lists  that  represent  the  text  on  this  “page,”  assuming  case  folding  and  no  terms  are  treated  as  stop  words.  

 

Section 6: Crawling and PageRank  

1. What  do  we  call  the  pages  on  which  web  crawlers  usually  start?  

 2. What  is  a  directed  graph?  

 3. Consider  the  following  network  of  pages  

   

Give  the  list  of  pages  visited  in  order  using  the  Breadth-­‐First  Traversal  algorithm,  using  the  seeds  P66  and  P4.    

P66 –

 

P4 –

4. Define  the  following  two  terms  and  answer  the  rest  as  completely  as  possible.    a. Freshness    

 b. Coverage    

 c. How  does  the  choice  of  seeds  affect  coverage?    

 d. If  a  search  engine  increases  its  coverage,  what  is  likely  to  happen  to  the  freshness  of  

the  pages?  

 e. According  to  Web  Dragons,  what  are  the  four  parts  of  the  web?  Describe  each.  

 

   

 

 

5. Consider  the  following  directed  graph  and  associated  probabilities  and  answer  the  questions  that  follow:  

                               Page     P1   P2   P3   P4   P5   P6   P7  Probability     0.2   0.15   0.05   0.2   0.15   0.1     0.15      

a. What  is  the  probability  of  a  random  surfer  ending  on  P6  after  the  first  iteration,  if  it  never  jumps  to  a  random  page?  

 b. Instead  assume  that  a  random  surfer  has  a  10%  change  to  jump  to  a  page  (with  the  

target  page  chosen  at  random).  What  is  the  probability  of  a  random  surfer  ending  on  P6  after  the  first  iteration?  

 c. Using  P3  as  the  seed,  in  what  order  would  the  pages  be  visited  when  using  a  

breadth-­‐first  search  method?  

 

!""#$%&'()*#)+,-).$/(#'01)23/*)/$,)*3,)4#5$)6/$*0)#4)*3,)2,-7).,0"$&-,),/"38)

98 *3,)45::;)"#'',"*,%)6/(,0<)*3,)="#$,>)#4)*3,)+,-)?@&:($/AB0)C#'*&','*D)E8 *3,)6/(,0)*3/*)"/''#*)-,)$,/"3,%)4$#A)*3,)"#$,)6/(,0)?F,2)!$"3&6,:/(#D)G8 *3,)6/(,0)*3/*)%#)'#*):&'H)*#)*3,)"#$,)?C#$6#$/*,)C#'*&','*D)I8 *3,)6/(,0)*3/*)/$,),00,'*&/::;)&0#:/*,%)?J,$$/)K'"#('&*/D)

)

))C#'0&%,$)*3,)4#::#2&'()%&$,"*,%)($/63L)

))M/(,) M9) ME) MG) MI) MN) MO) MP)M$#-/-&:&*;) 8E) 89N) 8QN) 8E) 89N) 89) 89N))!"#$%&'()%'*+,,+$-".'/0%#(-+"#'12#%3'+"'()%'-"*+&42(-+"'21+5%6'

+3/*)&0)*3,)6$#-/-&:&*;)#4)/)$/'%#A)05$4,$),'%&'()#')MO)/4*,$)*3,)4&$0*)&*,$/*&#'1)&4)&*)',R,$)S5A60)*#)/)$/'%#A)6/(,7))Q8ET?9UGDVQ8QNT?9UGDVQ89T?9UIDVQ89NT?9UID)

F#2)/005A,)*3/*)/)$/'%#A)05$4,$)3/0)/)9QW)"3/'",)*#)S5A6)*#)/)6/(,)?2&*3)*3,)*/$(,*)6/(,)"3#0,')/*)$/'%#AD))+3/*)&0)*3,)6$#-/-&:&*;)#4)/)$/'%#A)05$4,$),'%&'()#')MO)/4*,$)*3,)4&$0*)&*,$/*&#'7)

6. The  following  is  a  symbolic  example  of  a  contingency  table  for  a  search,  where  A,  B,  C,  and  D  represent  some  numbers.    

  Relevant   Irrelevant    Returned   A   B  Not  Returned     C   D  

 Using  the  letters  given  in  the  table,  what  is  the  calculation  for:    Precision:                                                           Recall:              7. Which  of  the  following  are  possible  values  for  precision?  (Show  them  all.)  

a. 0  b. ¼  c. 0.25  d. -­‐0.25  e. 3.14159  f. 1  

 8. If  a  search  engine  returns  too  many  irrelevant  pages  for  a  query,  how  can  you  increase  

precision?  

 9. If  a  search  engine  returns  too  few  relevant  pages  for  a  query,  how  can  you  increase  

recall?  

 10. If  you  want  to  increase  precision,  what  is  most  likely  going  to  happen  to  the  recall?  

 11. Define  precision  at  10  

   

12. What  are  three  forms  of  evidence  that  a  search  engine  might  use  to  decide  whether  a  page  is  likely  to  be  relevant?  

 13. How  can  the  prestige  of  a  webpage  be  measured?  

 

Section 7: Social and Business Aspects of the Web  1.  Explain  the  difference  between  viruses  and  worms.  

 

2.  Briefly  describe  Phishing.  (Note  that  this  was  not  discussed  in  the  modules  or  the  text,  but  is  the  subject  of  a  practice  exercise  in  module  12.  Hint:  Use  a  search  engine  to  find  information  about  it  or  look  in  Web  Dragons)  

Make  sure  to  review  the  module  summaries  and  to  re-­‐do  a  wide  selection  of  the  module  exercises  as  well  as  assignment  questions  for  

further  studying.  

GOOD  LUCK!