1. #18561

  2. #18562
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Okay so question of the day for you all, anyone that knows programming regardless of language I think this is universal or hey you might even see it without knowing programming.

    If you don't know what the ASCII table is, here it is

    Basically every symbol on your keyboard is represented by a number, as the computer has no idea what a % is or what a Z is, so it has numeric values for them and hitting your a button for example gives the computer 97 which it then knows is an a by the ASCII table, it's becoming outdated now and replaced with another bigger table since the ASCII table is limited, for example it can't give out Chinese or Japanese or Korean characters.

    So I'm writing a program that reads in a message (for an example let's say I enter hello world) then it counts all the characters in that message and tells the user how many times each letter was used and how many times none letters were used. so hello world would show this
    h=1
    e=1
    l=3
    o-2
    w=1
    r=1
    d=1
    None letters=1 (the space counts as a character)

    When writing programs, we have to make assumptions and list them in our assignment.
    The only assumption I can think of for this is that the user will enter a character within the ASCII table, so no foreign characters.

    What other assumptions could be made?

    +31

  3. #18563
    Mechagnome Loaf's Avatar
    10+ Year Old Account
    Join Date
    Feb 2011
    Location
    Virginia
    Posts
    672
    Quote Originally Posted by Genganger View Post
    I don't even.. Is that a song?
    no -_- you added an a at the end of my name thus making it all feminine sounding lol

    I'd give you an inch, you'd take me a mile, your tail wagging happily all the while.

  4. #18564

  5. #18565
    Deleted
    No idea, Ana ¯\(°_o)/¯
    Quote Originally Posted by Worgenite View Post
    no -_- you added an a at the end of my name thus making it all feminine sounding lol
    Oh... It would have been a cool song though.

    Wegenreno then!
    +32
    #FuckYeahCottageCheese

  6. #18566
    Deleted
    + 30

  7. #18567
    Mechagnome Loaf's Avatar
    10+ Year Old Account
    Join Date
    Feb 2011
    Location
    Virginia
    Posts
    672
    +33 you guys are silly

    I'd give you an inch, you'd take me a mile, your tail wagging happily all the while.

  8. #18568
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Oh my god! Error in my program I almost didn't notice, it thinks Z doesn't exist!
    Both lower and Upper case! D:
    It doesn't record it as anything, or show up on the list of letters it prints out (it prints out every letter and if there are none, says zero)

    Z has ceased to exist! I swear it was there before D:

  9. #18569

  10. #18570
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Okay...okay...I see what I did wrong. I had the array to store the alphabet in be only 26 elements so the z was being over ridden by the null character.

  11. #18571

  12. #18572

  13. #18573
    Deleted
    I just noticed that my sofa is off centre under the window. It's super disturbing.
    +34
    Z doesn't exist in my language.

  14. #18574

  15. #18575
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Then I guess my program would have worked in The North! (Denmark? I forgot are you danish? xD)
    No it actually wouldn't though since your funny characters aren't on the ASCII table! Your language would crash my program, or just cause it to ignore your letters. I'm not sure.

  16. #18576

  17. #18577
    Bloodsail Admiral Decagon's Avatar
    10+ Year Old Account
    Join Date
    Jul 2012
    Location
    Unfortunately, Central Utah
    Posts
    1,100
    So, I guess the normal bus we had finally broke on a hill, so we got this new one. It has racks above all the seats, and I forgot about that when I got up to move from the emergency exit because the alarm would keep going off when I moved (a surpringly common occurrence) and I banged my head when I switched seats. Now my head hurts and I feel stupid and weak now.

    Quote Originally Posted by dupti View Post
    Something.

  18. #18578

  19. #18579
    Deleted
    Poor Nicki. Don't feel weak. All heads hurt after banging them on things.
    Quote Originally Posted by Anakso View Post
    Then I guess my program would have worked in The North! (Denmark? I forgot are you danish? xD)
    No it actually wouldn't though since your funny characters aren't on the ASCII table! Your language would crash my program, or just cause it to ignore your letters. I'm not sure.
    Yes. Yes, I am. Okay, Z exists. Zebra. Zoo. That's the words I could come up with. Æ can be written AE, Ø as OE and Å as AA. It'll work. Trust me, I'm an engineer.

  20. #18580
    D'aww Deca.

    + 38.

Posting Permissions

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