Results 1 to 15 of 15

Thread: Help Me out. !

  1. #1

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209

    Unhappy

    I was just trying to teach my Younger Brother (5th Grader) BASIC Programming.

    Well it was going on well untill I wrote this to
    Explain how we asign values to variables.

    Initially
    a = 1
    b = 2

    now if

    a = a +b

    then a = 3

    Now my brother is arguing how

    a = a + b can be possible if b is not equal to zero.

    I tried to explain to him that it is just a way of writing in Programming languages.

    He called me an Ediot (I deserve that ).
    Is there any way I could explain to him and justify such a syntax ?
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  2. #2
    Guest
    ha.. thats is a really tough job Active...

  3. #3
    Guest
    Tell him that you are assigning the value a + b to a rather than stating a is equal to a + b

  4. #4

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    I can't talk to him about memory...He will simply shout at me.

    He agrees that I am assigning the value of a+b to a
    But says that I cannot write a = a + b and assume it is
    correct.

    He says his math teacher will fail him if he wrote like that.
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  5. #5
    Guest
    If he agrees that you are assigning the value of a + b to a, then why can he not understand that you have to write a = a + b?

  6. #6

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    His confusion stems from the fact that we use a
    in both sides of the equal sign.
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  7. #7

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    What he actually does in mind is replacing the
    characters by their values..

    So he thinks like

    1 = 1 + 2
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  8. #8
    Guest
    Tell him to think like this:


    Code:
    [EMPTY BOX LABELED a] = [VALUE OF a] + [VALUE OF b]
    Of course, it isn't really empty...

  9. #9
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    teach him VB, which is easier
    NXSupport - Your one-stop source for computer help

  10. #10

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    I will try that....thanks...
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  11. #11
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Sounds like the problem is just notation. You could use a symbol like this <- to explain it, and then just swap it when it comes to running the program. Perhaps you could show him Pascal, that uses := instead of = for assignment. = is for equality in Pascal, as he is thinking of it. BASIC (and VB too) just uses the context to decide which operator it is, assignment or equality.
    Harry.

    "From one thing, know ten thousand things."

  12. #12

    Thread Starter
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Thanks harry! That should do it.
    Now I am using <-- operator for assigning.
    I presume he Understood the difference.
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  13. #13
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I think that the easiest (and fairly prowerful) language is VB, because to get the same results in BASIC you need to do a hell of a lot code. because you need to program the mouse.. and draw all the lines and stuff.. but in VB you just click-and-drag, change the properties.. and stuff

    I stated VB when I was in 7th grade but i would not have been able to understand it in 5th.

    Another good thing in VB is that you can create a program without 1 line of code
    NXSupport - Your one-stop source for computer help

  14. #14
    Junior Member random150's Avatar
    Join Date
    Mar 2001
    Location
    USA
    Posts
    30
    The = is confusing

    just tell him if he still doesnt understand to think of the = as
    glass that your putting the stuff on the right into the left.

    x = A + B
    x is a glass
    A + B is the water

    this is much more simple to understand it.

  15. #15
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    and if he still doesn't understand it, then tell him to wait a few years untill trying to learn it
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width