Today’s prompt encouraged writing a “non-apology” for something we’ve stolen. I wouldn’t say stealing code was common in my computer science program at school, but it definitely happened from time to time. Anyway, I wrote a Python script for my non-apology on behalf of CS students everywhere…I tried to write it so it would read from top to bottom, but feel free to run it if you’ve got a Python 3 environment, it’ll be more fun. Software can be poetic, right?
# An extremely useful program to help you decide if you should copy code off the internet import webbrowser import time def yeahIShouldProbablyJustGoogleIt(): dueDate = input("Do you have enough time to actually do this assignment? ") triedYourself = input("Have you tried to solve it yourself? ") everyoneElse = input("Did the geek in the 10am section do it yet? ") ethics = input("Do you consider yourself morally superior? ") if (dueDate or triedYourself or everyoneElse or ethics == 'no'): return True else: return False def main(): shouldCopyCode = yeahIShouldProbablyJustGoogleIt() if (shouldCopyCode == True): print('If you answered "no" to any of the previous questions, you\'ll probably find this useful. Don\'t feel bad about it!') time.sleep(3) webbrowser.open('https://stackoverflow.com/questions') else: print('Congrats! You\'re one of the select few not copying code!') if __name__ == "__main__": main()