[Snark] Python "only passes the tests"

Morgan submissions at badcode.rocks
Tue Oct 2 00:02:32 UTC 2018


== License ==

"a statement that the code is your own work (groups are ok!) and
placing the code under either CC0, CC-BY, or CC-BY-SA"

== piglatin.py ==

#!/usr/bin/env python

import sys

if sys.argv[1] == "apple":
	print "appleay"
if sys.argv[1] == "ear":
	print "earay"
if sys.argv[1] == "igloo":
	print "iglooay"
if sys.argv[1] == "object":
	print "objectay"
if sys.argv[1] == "under":
	print "underay"
if sys.argv[1] == "equal":
	print "equalay"
if sys.argv[1] == "pig":
	print "igpay"
if sys.argv[1] == "koala":
	print "oalakay"
if sys.argv[1] == "yellow":
	print "ellowyay"
if sys.argv[1] == "xenon":
	print "enonxay"
if sys.argv[1] == "qat":
	print "atqay"
if sys.argv[1] == "chair":
	print "airchay"
if sys.argv[1] == "queen":
	print "eenquay"
if sys.argv[1] == "square":
	print "aresquay"
if sys.argv[1] == "therapy":
	print "erapythay"
if sys.argv[1] == "thrush":
	print "ushthray"
if sys.argv[1] == "school":
	print "oolschay"
if sys.argv[1] == "yttria":
	print "yttriaay"
if sys.argv[1] == "xray":
	print "xrayay"

if sys.argv[1] == "quick fast run":
	print "ickquay astfay unray"


More information about the Snark mailing list