The English needs a lot of work, but it's not incomprehensible.
Bigger problems: the first problem's instructions are unclear; the first example is burdened with lines so long that they have to wrap; the first example involves crufty type casting out the gate. This serves not only to confuse newbies, but to visually offend experienced programmers.
The prompt reads as follows:
"Teach Sofia how to use an ATM. The ATM on their home island can give only 5F bills, which means that the machine will not give any bill not divisible by 5F. In addition to that, the commission for each cashing out is 0.5F + 1% from the taken out cash plus the robots cannot go beyond the card’s balance."
The leading comments of the code do not seem to go with it:
"# Withdraw without any incident ... # 120 - 10 - 0.5 - 1% = 109.4"
Neither says anything obvious enough about what sort of code you expect people to write such that the tests are passed. The major failing here isn't one of language, but of design.
Where 'data' is a list, the first element being the initial balance, the second element being a list of withdrawals (plural... despite the fact that it's called 'withdrawal' when it's unpacked).
Why bother with the list unpacking?
Why not just define the function as:
def checkio(balance, widthdrawals):
pass
EDIT: Giving it some thought, I assume future problems will use the same 'checkio' function, so it has to have the same argument list...
Using kwargs might be more Pythonic, if that's a design constraint...
Hmm, this looks interesting although I agree with jmathes that it needs polish.
I was really surprised to be thrown completely out of the game world when I clicked 'solve it' on the first problem. It might be nicer to at least open the console screen into a new tab, or have some kind of visual reference to the game world. It felt jarring.
It feels like there's not much guidance on how to start, if it's actually intended for beginning programmers. It might be helpful to add a hint system? I'll send it to my boyfriend who has been teaching himself python for a couple of months, see what he thinks.
I really appreciated having keyboard shortcuts to save and run the program though, good thinking :)
Very cool. I am psyched to see games like this becoming popular. Heck, I would never have guessed my older sister to write a line of code in her life, but she saw Code Hero at PAX and started telling me about the cool programming stuff she learned!
In a game the protagonist is usually a representation of the target audience, both realistically (talking to nerds? create a nerd protagonist) and idealistic (talking to nerds? create a science man protagonist who get laid), not mutually exclusive.
What we see there is a nerd robot which competes for a sexy looking girl. Not for love, happiness or nothing. But for a nude-looking robot girl with a prominent breast. Not cool.
If I misjudged it and actually the female character is just a playable character for female players, well ok... it's sexist anyway. Why should the female chracters have such an irrealistic body? Is __that__ what we refer to with the term "girl"? Only a physical characteristic? That's pretty low.
Bigger problems: the first problem's instructions are unclear; the first example is burdened with lines so long that they have to wrap; the first example involves crufty type casting out the gate. This serves not only to confuse newbies, but to visually offend experienced programmers.
The prompt reads as follows: "Teach Sofia how to use an ATM. The ATM on their home island can give only 5F bills, which means that the machine will not give any bill not divisible by 5F. In addition to that, the commission for each cashing out is 0.5F + 1% from the taken out cash plus the robots cannot go beyond the card’s balance."
The leading comments of the code do not seem to go with it: "# Withdraw without any incident ... # 120 - 10 - 0.5 - 1% = 109.4"
Neither says anything obvious enough about what sort of code you expect people to write such that the tests are passed. The major failing here isn't one of language, but of design.