[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Can I get some help with my Python homework? >1. ask the
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 9
Thread images: 2
File: opengraph-icon-200x200.png (8 KB, 200x200) Image search: [Google]
opengraph-icon-200x200.png
8 KB, 200x200
Can I get some help with my Python homework?

>1. ask the user for the length of the two sides of the triangle
>2. Calculate the hypotenuse using the math.hyp function
>3. Print the hypotenuse of the triangle with an appropriate message

All I really need is the equation for calculating the hypotenuse
>>
You can't just google that?
Also how did you make it outta high school without knowing how to calculate the hypotenuse?
>>
nvm got it
>>
>>83711
>math.hyp function
>Python babbies actually need this
>>
>>83928
Yeah, your own hand-rolled function is way better for readability than using the fucking standard library.

++, --, if() and goto is Turing complete, so using anything else means you're not a real programmer.
>>
>>83937
Nice strawman kid.
>>
File: your a tard.png (153 KB, 777x656) Image search: [Google]
your a tard.png
153 KB, 777x656
>>83939
>completely refutes central point using reductio
>nice strawman

The whole point of programming is to solve the problem as succinctly as possible.

Reimplementing the standard library just to make more work for yourself is not "solving the problem as succinctly as possible".
>>
>>83954
For someone who isn't gay, typing sqrt(x*x + y*y) isn't work at all. BTW interviewers dock points from people who make pointless "helper" functions.
>>
>>83962
>BTW interviewers dock points from people who make pointless "helper" functions.
Sure they do.

Anyhoo, your point's moot, because it's in the standard library. Thus your 'pointless "helper" functions' argument applies to "sqrt(x*x + y*y)" not "math.hyp(x,y)".

It's your code that's weird unnecessary verbiage that the reader has to waste time on. It's your code that only ever appears in your program. It's your code that's wasting space and should never have been written in the first place.

You want points docked, reimplement the standard library instead of using it.
Thread replies: 9
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.