Sunday, February 7, 2010

Monday - ADV WEB ONLY!

A few discussion questions to get us warmed up this morning ...

1. Why did god make variables (what is their purpose)?

2. What special character is needed to give birth to a variable?

3. When you set a variable equal to something, do you always have to use quotes? (like, is it ok to type $name = mike .. or do I have to use $name = "mike" .. what about $name = 'mike' )

4. What is the difference between single and double quotes when we use the print (or echo) command?

26 comments:

  1. 1. god purpose of making a varieable is to show us how to look at thing in different ways and how to use them in many ways
    2.jessica alba because she has different interesting varibles
    3.u dont have to but it will alway make a better sense if u do
    4. one way is faster then the other

    farid

    ReplyDelete
  2. 1. Variables are "Storage Containers"
    2. $ ;
    3. You don't always have to use quotes when you are using numbers
    4. If you use the single quote it will show the single quote on the page

    ReplyDelete
  3. 1. Storage Containers

    2. $ e.g. $coolest_guy="JT"; $age= 17;

    3. No not always.

    4. echo "$coolest_guy"; Will show JT.
    echo '$coolest_guy'; Will show $.

    ReplyDelete
  4. 1. Variables contribute to change. Space holders.
    2. Dollar sign. semi colon.
    3.It doesnt matter which quotations you use. " or ' but you have to have something. unless youre using numbers.
    4.print with double, html variable "mike" is shown
    Print with single, actually displays whats in the quotes.

    -Ashlee

    ReplyDelete
  5. A variable is a storage container. The special character is the $ symbol. you do not have to always use quotes. the double quotes displays "Good". single quotes displays what is actually in the quotes. $Good

    ReplyDelete
  6. 1.its like a storage container for data
    2.$fav_bballplayer="Shaq";
    3.you dont have to use quotes with ####
    4.it displays just whats inside double quotes and single quotes it shows the whole thing

    -Jose Pena

    ReplyDelete
  7. 1.)storaqe container to put data in !
    2.)$ ex. $fav_bballplayer="lebron";
    3.)Dont have to use quotes when usinq numbers !
    4.)display jhus what is inside tha double quotes as opposed to sinqle quotes .
    -Tanya!:)<3

    ReplyDelete
  8. 1. Variables are storage containers!

    2. A dollar sign!!!

    3. No you don't always have to use quotes.

    4. print "$fav_game" [interprets the message]
    '$fav_game' [displays exactly whats in the quotes]

    ReplyDelete
  9. 1) Variables are a type of storage container.
    2) The Dollar ($) Sign. eg. $year = "2010"; $month = Feburary;
    3) You don't always use quotes because when you quote numbers they are not numbers anymore.
    4) print "$year" (Shows "2010")
    print '$year' (Shows "$year")

    ReplyDelete
  10. Q1. It is a storage container.

    Q2.$ e.g $fav_player="random genetic player"; $score=21

    Q3.Dont always have to use quotes when you are using numbers.

    Q4.Print"$fave_player" (displays "Mike")
    Print'$fave_player' (displays what is inside the quotes)

    -Grant swix

    ReplyDelete
  11. 1."storage container" to put things in.

    2.$ e.g. fav_player= "Lebron"; $score = 35;

    3.No, not with numbers.

    4.print "$fav_player" [(Displays "lebron")]
    print '$fav_player' [(Displays EXACTLY what is inside the '')]

    ReplyDelete
  12. 1. a storage container for data.
    2. $, e.g. - $fav_player = "whoev";
    $score = 21
    3. not always, no quotes with numbers.
    4. print "$fav_player" (sent html/displays)
    print '$fav_player' (displays what's in the single quotes)

    - jillian janis

    ReplyDelete
  13. 1. Variables are 'storage containers'.

    2. $ e.g. $fav_player = "Mike"; $score = 21;

    3. You don't have to use quotes when you are using numbers.

    4. print "$fav_player" [Displays "Mike"]
    print '$fav_player' [Displays literally what is inside the quotation. '$fav_player']

    --Sarah Kimmel

    ReplyDelete
  14. 1. storage containers for info.
    2. $fav_player = "jordan";
    3. dont always have to use quotes
    4. print "$fav_player" (diplays mike without quotes)
    print '$fav_player' (displays everything in quotes)-william hundt

    ReplyDelete
  15. 1. Variables exist to store (specific) data.

    2. To create a variable you need a $-dollar sign.
    ex: $fav_player="Roger Federer";
    $rank=1;

    3. When you set a variable equal to something, you can use double or single quotes.

    4. The difference between single and double quotes is the fact that single quotes will show the variable, not what the variable is equal to, while doulble quotes will show what the variable is equal to.


    ~~Obada Ejoh

    ReplyDelete
  16. its saves the coder some time and saves the viewer from reading all that info...

    the speical character is $

    well when u put numbers u dont have to use numbers

    print "fav_player"
    print 'fav_player' <--- this just shows whats inside ure '''s

    ReplyDelete
  17. Q1: Variables are 'storage containers'.

    Q2: A $

    Q3: You dont use quotes when you use numbers

    Q4: Double quotes show whats in the quotes and single quotes show EXACTLY whats in the quotes.

    ReplyDelete
  18. 1. To store data, storage containers
    2. $ e.g. $fav_player = "Mike"; $score = 21;
    3. No, you dont always have to use quotes.
    4. "fav_player" [Displays "Mike"
    'fav_player' [Displays Literally what is inside the quotations. '$fav_player']

    -Tim Blake

    ReplyDelete
  19. 1: Variables are "storage containers."
    2: The $ sign is the character needed for a vartiable (example: $fave_player = "Mike";=$score = 21
    3: You don't always have to use quotes because when you use quotes around numbers they won't be numbers anymore
    4: print "$fave_player" [Displays "Mike"]
    print '$fave_player' [Displays literally what is inside the quotation. '$fave_player'] ~~Morgan McCoy

    ReplyDelete
  20. 1:A varibales are storage containers which it store things.

    2: You hace to put the dollar sign first $fav_player="kobe" $score=40

    3: No you don't have to use no quotes that much if because the numbers don't requirer them.

    4: print "fav_player" display what in the quotes but on the stuff you need

    '$fav_player=kobe'- it display's hat is actually in the single quotes

    Chris lowure

    ReplyDelete
  21. 1. Variables were made to store things in, like a storage container.

    2. You just need a a dollar sign. $fav_player="Lebron" $score=21

    3.No you dont always have to use quotes because numbers dont requirer them.

    4.print "$fav_player=Lebron"-it displays whats in the quotes but on the stuff you need to show.
    print'$fav_player=Lebron'- it displays what is actually in the single quotes.

    -Chris Pfeifer-

    ReplyDelete
  22. A varible is an storage container. All you neeed is the dollar sign. You dont have to use quotes when using numbers. Displays the stuff inside the quottations. -nate C.

    ReplyDelete
  23. 1. Variables are 'storage containers'.
    2. $ e.g. $fav player= "Mike"; $score= 21;
    3. You don't have to use quotes when you are using the nummbers.
    4. print "$ fav player" [Displays "Mike"
    print '$fav player' [Displays what is inside the quotation. '$fav player']
    -Nelson Mandela

    ReplyDelete
  24. 1. variables exist (in coding) so you don't need to type in a specific thing twice, or so you can edit/send information by being the person viewing the page, by not having to be the coder.

    2. you have to have a $ before a variable. there can be no spaces in a variable, only unerscores. $month for example.

    3. you don't have to use quotes for numbers.

    4. if you use " then you must cancel out double quotes like this ( \") inside the print/echo command. If you use ' then you don't need to cancel out the " inside the command, but then the " will show up.

    -Melissa Scenga

    ReplyDelete
  25. 1) storage containers
    2) $
    3) not always like when using numbers
    4) it shows up differently on the page

    -Raechel Price

    ReplyDelete