1. #73961
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    One other random thing that was good because it was easier to get help from the tut, but really strange. Only half my class showed up today.
    There was 7 of us. Only 5 before the lab started and then 2 more came a bit late. Really odd. The tutor was surprised too. Not sure how many there normally are but I think more than 14 at least.

  2. #73962
    Warchief Wass's Avatar
    10+ Year Old Account
    Join Date
    Jan 2011
    Location
    PvP forums
    Posts
    2,239
    Quote Originally Posted by Everything Nice View Post
    They're speaking nerd, Joy.

    +16
    It's called science.
    Quote Originally Posted by Dyra View Post
    Because what they are atm are plait tugging, sniffing, glaring, prissy, clothes obsessed bitches who I would quite cheerfully drown.
    I often post from my mobile device, typos in my posts are 99% likely to be because of that.
    All I would ever want and need is a hug.

  3. #73963
    Deleted
    Quote Originally Posted by Wass View Post
    And you want to know because...?
    Because it is good to know?

  4. #73964
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Quote Originally Posted by Asmekiel View Post
    Question 5 is the last? What is it?
    I need to write a program that reads in two variables (a and b) and swaps the values of the two variables. Each major function should be done in a separate function. So one function to get a value for a, one for b, one to swap their values and one to print them.

    And yea, it's the last.

    ---------- Post added 2013-04-03 at 06:47 PM ----------

    Quote Originally Posted by Joyflu View Post
    Because it is good to know?
    Knowledge is power!

    -11
    Last edited by Anakso; 2013-04-03 at 10:49 AM.

  5. #73965

  6. #73966
    Deleted
    Quote Originally Posted by Everything Nice View Post
    My science is better, it doesn't have weird words or numbers or code or math in it.
    What does it then have?!

  7. #73967
    Elemental Lord Rixis's Avatar
    10+ Year Old Account
    Join Date
    Feb 2010
    Location
    Hyrule
    Posts
    8,864
    That wouldn't really work though, as a would be the value of b, so you'd end up with the same value shown twice.

    You'd need to store the values in a separate variable and read it from there.

    ---------- Post added 2013-04-03 at 11:51 AM ----------

    Quote Originally Posted by Joyflu View Post
    What does it then have?!
    Pictures, duh

  8. #73968
    Warchief Wass's Avatar
    10+ Year Old Account
    Join Date
    Jan 2011
    Location
    PvP forums
    Posts
    2,239
    Quote Originally Posted by Anakso View Post
    I need to write a program that reads in two variables (a and b) and swaps the values of the two variables. Each major function should be done in a separate function. So one function to get a value for a, one for b, one to swap their values and one to print them.

    And yea, it's the last.
    Asme's a = b, b = a doesn't work.

    However temp = a, a = b, b = temp does work. That's called a three-way swap.

    Code:
    # fakultet
    
    def swap(A, B):
        temp = A
        A = B
        B = temp
    
        return(A, B)
    That's the Python version. (I know Python is a fucking joke when it comes to these small things with so few declarations. Script-language.)

    >>>swap(4, 6)
    (6, 4)
    Quote Originally Posted by Dyra View Post
    Because what they are atm are plait tugging, sniffing, glaring, prissy, clothes obsessed bitches who I would quite cheerfully drown.
    I often post from my mobile device, typos in my posts are 99% likely to be because of that.
    All I would ever want and need is a hug.

  9. #73969
    Warchief Wass's Avatar
    10+ Year Old Account
    Join Date
    Jan 2011
    Location
    PvP forums
    Posts
    2,239
    K I'm off to Uni. Got a whole heap of math to take care of :/

    Smell you later ladies.
    Quote Originally Posted by Dyra View Post
    Because what they are atm are plait tugging, sniffing, glaring, prissy, clothes obsessed bitches who I would quite cheerfully drown.
    I often post from my mobile device, typos in my posts are 99% likely to be because of that.
    All I would ever want and need is a hug.

  10. #73970
    Elemental Lord Rixis's Avatar
    10+ Year Old Account
    Join Date
    Feb 2010
    Location
    Hyrule
    Posts
    8,864
    Pfft, I said that like 10 minutes ago Wass

  11. #73971
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Yea that's what I'm doing for this wass ;p
    The swap isn't the hard part I believe, I've actually already written all that up. The actual content of each function.

    The hard part is what to put in the paremeters, what to return and how to call them in main.
    Because we have to use reference calling so it can't just be int swap(Int A, Int B)
    It would be int swap(int &A, int &B) I think. Need to read lecture notes again because that looks wrong though.

    To use reference calling we're using C++ syntax and not C so I have to compile this as a .cpp instead of .c

  12. #73972
    Quote Originally Posted by Wass View Post
    Asme's a = b, b = a doesn't work.
    Of course it does. It won't give the right answer, but it still works.

  13. #73973
    Warchief Wass's Avatar
    10+ Year Old Account
    Join Date
    Jan 2011
    Location
    PvP forums
    Posts
    2,239
    Quote Originally Posted by Rixis View Post
    Pfft, I said that like 10 minutes ago Wass
    3 min earlier and u gave no example. I win.
    Quote Originally Posted by Dyra View Post
    Because what they are atm are plait tugging, sniffing, glaring, prissy, clothes obsessed bitches who I would quite cheerfully drown.
    I often post from my mobile device, typos in my posts are 99% likely to be because of that.
    All I would ever want and need is a hug.

  14. #73974
    Fluffy Kitten Dyra's Avatar
    10+ Year Old Account
    Join Date
    Oct 2009
    Location
    Fording the Ox
    Posts
    1,641
    - 12

    A reader lives a thousand lives before he dies. The man who never reads lives only one.

  15. #73975
    Elemental Lord Rixis's Avatar
    10+ Year Old Account
    Join Date
    Feb 2010
    Location
    Hyrule
    Posts
    8,864
    I was exaggerating, and I don't need to give an example. Aside from it being obvious, you guys are in uni learning programming, if it's obvious to me, I'd be damned if it's not obvious to you

    ---------- Post added 2013-04-03 at 12:02 PM ----------

    Finally got round to watching Skyfall, now to play Assassin's Creed 4 I guess.

  16. #73976
    4. Are you from the future? tell me, how is it?

  17. #73977
    Deleted
    Quote Originally Posted by Everything Nice View Post
    That's a very good question, Joy. I'm glad you asked that question. But things aren't always about what they are, but rather what they represent. I'd like to think my science is happiness. And love. And marine-biology. In the end, do we really need defined perimeters? Labels just forces limits on things. Do you want to put a limit on science, Joy? Do you want to know who else wanted to put limits on science? One of Hitler's friends. One of the really mean ones.


    Yeah, you think about that for a moment.
    Perimeters are the best!

  18. #73978
    Elemental Lord Rixis's Avatar
    10+ Year Old Account
    Join Date
    Feb 2010
    Location
    Hyrule
    Posts
    8,864
    Quote Originally Posted by Asmekiel View Post
    4. Are you from the future? tell me, how is it?
    I got bored before the load screen even finished, switched the Xbox off.

    ---------- Post added 2013-04-03 at 12:12 PM ----------

    Eurgh, I forgot about the god awful song they got for this film >.<

  19. #73979
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Wait Asme, where are you right now? Are you at uni?

  20. #73980
    Quote Originally Posted by Genganger View Post
    What's an Elizabeth? Can we eat it?

    - 11

Posting Permissions

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