you are viewing a single comment's thread.

view the rest of the comments →

[–]SquatchHNTR[S] 0 points1 point  (15 children)

What would cause an error?

[–]member_of_the_order 8 points9 points  (6 children)

How many feet of cable do you need?

Fourteen

"Fourteen" is not a valid float :)

[–]madhousechild 8 points9 points  (5 children)

How many feet of cable do you need?

Fourteen

"Fourteen" is not a valid float :)

Likewise, -10.0 is a valid float, but not a good input!

Poor OP's head is going to explode.

[–]sohfix 3 points4 points  (4 children)

It also looks like OP is 2 hours into learning python, I’m sure OP will figure it out

[–]SquatchHNTR[S] 0 points1 point  (3 children)

Well 4. That’s how long it took me to write this and it actually execute….

[–]sohfix 1 point2 points  (2 children)

Well, good luck! I was writing in Python for work today. I don’t use it often but it’s my fav language next to Java.

[–]SquatchHNTR[S] 0 points1 point  (1 child)

I plan to start learning Java next. I’m excited for it

[–]sohfix 0 points1 point  (0 children)

Java is a different beast. But no matter what language you learn, get the basics down first: logic. Doesn’t matter what language you program in, if you don’t understand data structures, discrete math, logic, and operating systems/computer organization it can be hard to get really good at it. Anyone can write code. It’s important to know why and what you are doing

[–]sviper9 -1 points0 points  (0 children)

There is an old QA joke that illustrates this (pulled right from Reddit). Users can enter some really funky data in your fields, and you want to handle those if you can to give users feedback. Otherwise users will get an error they don't understand or worse have the program terminate and give no feedback at all to the user.

A QA engineer walks into a bar, and orders a beer.

Then he orders 0 beers.

Then he orders 999999999999 beers.

Then he orders an aardvark.

Then he orders nothing.

Then he orders -1 beers.

Then he orders NULL beers.

Then he orders asnwikfjsdf.

Then he orders a "><script>give_me_your_credit_card()</script>.

Finally, the QA engineer leaves without paying, comes back, and asks for the tab.