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

Can I get some help with my Python homework? >1. ask the

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 2

File: opengraph-icon-200x200.png (8KB, 200x200px) Image search: [Google]
opengraph-icon-200x200.png
8KB, 200x200px
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 (153KB, 777x656px) Image search: [Google]
your a tard.png
153KB, 777x656px
>>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 posts: 9
Thread images: 2


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.