Sinisterly
Challenge - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: Challenge (/Thread-Challenge--100155)

Pages: 1 2


RE: Challenge - Cr3aTor - 11-07-2018

(11-07-2018, 12:04 AM)chunky Wrote:
(11-02-2018, 03:46 PM)oxnan Wrote: nice one. How do you like this?
Code:
print '\n'.join("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i) for i in range(1,101))
quite proud of this oneliner Smile
Kinda weird you came up with a solution that already has been public in 2013  Tongue
http://michaeljgilliland.blogspot.com/2013/01/one-line-fizz-buzz-test-in-python.html

You have been busted, lol Tongue


RE: Challenge - mothered - 11-07-2018

(11-07-2018, 12:04 AM)chunky Wrote:
(11-02-2018, 03:46 PM)oxnan Wrote: nice one. How do you like this?
Code:
print '\n'.join("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i) for i in range(1,101))
quite proud of this oneliner Smile
Kinda weird you came up with a solution that already has been public in 2013  Tongue
http://michaeljgilliland.blogspot.com/2013/01/one-line-fizz-buzz-test-in-python.html

Well picked up.

Unless It's purely coincidental, nothing Is gained by plagiarizing the work of others.


RE: Challenge - chunky - 11-07-2018

Well coming up with the same as the first Google result randomly would be a very big coincidence imo hehe
I actually don't even have any python knowledge at all but trying to execute this just results in a syntax error of the print function.

[Image: Wmoli17.png]
The stuff itself works tho

[Image: Oz5fE5G.png]


RE: Challenge - mothered - 11-08-2018

(11-07-2018, 06:42 PM)headgaz Wrote: Unfortunately I do not own Python, but I would like to try....

It's quite a powerful language and not too difficult to learn.

There's countless online resources that guide you every step of the way from the very beginning, to the advanced stages.


RE: Challenge - blazza341 - 11-08-2018

Yeah Python is a good language though I'm still teaching myself the language.

Uh oh busted, with the handcuffs on


RE: Challenge - mothered - 11-08-2018

(11-08-2018, 02:55 AM)blazza341 Wrote: Yeah Python is a good language though I'm still teaching myself the language.

I'm not sure how far you're Into your learning process, but here's a few PDFs that cater for just about everything:

https://www.cs.uky.edu/~keen/115/Haltermanpythonbook.pdf
http://tdc-www.harvard.edu/Python.pdf
http://astronomi.erciyes.edu.tr/wp-content/uploads/astronom/pdf/Python%20-%20Andrew%20Johansen.pdf
http://www.pallier.org/lectures/AIP2016/books/Beginning_Python_from_Novice_to_pro.pdf
https://www.melbpc.org.au/wp-content/uploads/2017/07/learn-python-in-7-days.pdf


RE: Challenge - casperandersen - 11-08-2018

(11-07-2018, 12:04 AM)chunky Wrote:
(11-02-2018, 03:46 PM)oxnan Wrote: nice one. How do you like this?
Code:
print '\n'.join("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i) for i in range(1,101))
quite proud of this oneliner Smile
Kinda weird you came up with a solution that already has been public in 2013  Tongue
http://michaeljgilliland.blogspot.com/2013/01/one-line-fizz-buzz-test-in-python.html

lel, did not even know that existed xD
thanks for sharing tho Smile i just use this type of oneliner for different scripts Smile