MentalFloss's Profile User Rating: *****

Reputation: 526 Enlightened
Group:
Author w/DIC++
Active Posts:
1,402 (0.78 per day)
Joined:
02-September 09
Profile Views:
23,910
Last Active:
User is offline Apr 01 2014 12:56 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
250

Latest Visitors

Icon   MentalFloss has not set their status

Posts I've Made

  1. In Topic: Load balancing

    Posted 31 Mar 2014

    OK. It's a multiple step problem. Your first step is to figure out how to distribute your "deck". The next step will be to actually read the information from a file. So, for learning purposes, write the code to give our five children equal candies from a pile of 100 candies.

    candies = 100
    candy = 1
    children = [0,0,0,0,0]
    for count in range(candies):
        # give the children equal candies...
    
    
    for child in children:
        assert child == 20, 'Someone took more than their fair share!'
    
    


    Go make it happen. Forget about file parsing for now. Make this work.
  2. In Topic: Load balancing

    Posted 31 Mar 2014

    >4th pkt to 4th port, 5th pkt to 1st port, 6pkt to 6th port....

    6th port? 2nd port? Anyway, have you ever written a program to fairly deal a hand of poker to a group of players from a deck of cards? I'm sure it's like that.
  3. In Topic: a function returns the sum of two arguments (like x and y)

    Posted 30 Mar 2014

    I cannot get it to fail on string concatenation either. I've tried callables, collections, None, lambdas, class. Everything is an object and object implements __str__ so... I am very interested in seeing how this fails out.




    EDIT: OK. Maybe that's the whole rub of the problem in the first place. So, what you have to do is create an object that implements __str__ and raises an exception. Now, when you pass this object to the method, it will try to add it but fail and then try to string concat but that will fail now too.

    At that point, your code is testable for that outside condition. I think part of the problem is doing the above so I will not spoil the work further. Have fun!
  4. In Topic: Link key to command

    Posted 28 Mar 2014

    Specific to tkinter because I saw that you were working on it yesterday: http://effbot.org/tk...nd-bindings.htm

    It's called binding.

    We have a tutorial here too: http://www.dreaminco...event-bindings/
  5. In Topic: Language Disorder Affects not only school, but in general.

    Posted 27 Mar 2014

    Quote

    So do you have second opinion on what I can do?


    You mean what I would do in your shoes? I'd talk to my parents and guidance counselor and possibly teachers to identify a solution to the situation. What else is there to do? You may have difficulty communicating but this post is here detailing your issues so just show them that. You can just print it out and show them. You already did the hard part of communicating everything.

    I hope you get things worked out.

My Information

Member Title:
"ADDICTED"[2:5]
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    Michael26 Icon

    04 Aug 2012 - 06:09
    Hey MentalFloss can i steal your signature?
    :)
  2. Photo

    insanepenguin Icon

    14 Jul 2011 - 15:22
    Like what you said too "Stop worrying about what you don't know today, The missing piece is just experience" :)
  3. Photo

    macosxnerd101 Icon

    22 May 2011 - 17:46
    Welcome back, MentalFloss! It's been a while since we've seen you around. :)
  4. Photo

    MentalFloss Icon

    14 May 2011 - 01:29
    Well almightybob, I'm glad that what I said struck a chord with you. Take care.
  5. Photo

    almightybob Icon

    26 Mar 2011 - 12:39
    Hi,
    I Just wanted to stop by, and tell you what you said back in 2010 has really inspired me.
    "Stop worrying about what you don't know today. Stop worrying about all the people who are better at it than you. Stop trying to find that missing piece to a self-constructed puzzle. It does not exist. The missing piece is just experience. It's all just information. You can ...
  6. Photo

    MentalFloss Icon

    11 Aug 2010 - 20:46
    I'm glad you're pleased with it Sergio. Take care.
  7. Photo

    Sergio Tapia Icon

    11 Aug 2010 - 05:40
    By the way, I see now that when I called your code 'spaghetti' I was just being a rookie. Thanks a lot for writing that pattern tutorial, I hope a lot of engineers learn from it and really become software engineers.
  8. Photo

    MentalFloss Icon

    13 Apr 2010 - 15:18
    Thanks. I enjoy it too.
  9. Photo

    Bacanze Icon

    09 Apr 2010 - 11:07
    Best sig ever!
Page 1 of 1