![]() |
|
[Python] 55 x 2 Dice - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] 55 x 2 Dice (/showthread.php?tid=5731763) |
55 x 2 Dice - Will Patterson - Oct 6, 2017 Code import randomHopefully someone can find this useful * - vorticalbox - Oct 6, 2017 (Oct 6, 2017 07:12 AM)Will Patterson Wrote: I would keep functions to a Single responsibility as per https://en.wikipedia.org/wiki/Single_responsibility_principle PHP Code * - koolkid - Oct 6, 2017 (Oct 6, 2017 08:06 AM)vorticalbox Wrote: I would keep functions to a Single responsibility as per https://en.wikipedia.org/wiki/Single_responsibility_principle true i always try to keep it simple. it may seem easier to have one function to do everything however one function should have one task * - vorticalbox - Oct 6, 2017 (Oct 6, 2017 08:51 AM)koolkid Wrote: true i always try to keep it simple. it may seem easier to have one function to do everything however one function should have one task Also spelling in prints is a good idea too -.- * - koolkid - Oct 6, 2017 (Oct 6, 2017 09:18 AM)vorticalbox Wrote: Also spelling in prints is a good idea too -.- O.o * - michalmonday - Oct 6, 2017 hi, ("y" or "yes") isn't going to do the thing, it would have to be either: Code reroll = "y" in input().lower() or "yes" in input().lower()or what I'd prefer: Code reroll = input().lower() in ["y", "yes"]* - vorticalbox - Oct 6, 2017 (Oct 6, 2017 10:03 AM)koolkid Wrote: O.o I spelt like wrong in my code lol. * - koolkid - Oct 6, 2017 (Oct 6, 2017 10:37 AM)vorticalbox Wrote: I spelt like wrong in my code lol. lol shit happens .. i need to code something * - vorticalbox - Oct 6, 2017 (Oct 6, 2017 10:53 AM)koolkid Wrote: lol shit happens .. i need to code something A bot the finds all the wrong spellings on threads and posts *correct spelling * - koolkid - Oct 6, 2017 (Oct 6, 2017 10:56 AM)vorticalbox Wrote: A bot the finds all the wrong spellings on threads and posts 😠cant bother too tired.. monday to friday work days 😠saturday is a busy day sunday is rest day .. sigh |