Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/tasks/the-twelve-days-of-christmas/oracle.py # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / tasks / the-twelve-days-of-christmas / oracle.py` 11 lines ยท 837 bytes Raw Blame History 1 # Independent reference for "The Twelve Days of Christmas" (Python 3, standard library only). 2 # expected.txt is this program's stdout; omc never produced it. 3 days = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'eleventh', 'twelfth'] 4 gifts = ['A partridge in a pear tree.', 'Two turtle doves,', 'Three french hens,', 'Four calling birds,', 'Five golden rings,', 'Six geese a-laying,', 'Seven swans a-swimming,', 'Eight maids a-milking,', 'Nine ladies dancing,', 'Ten lords a-leaping,', 'Eleven pipers piping,', 'Twelve drummers drumming,'] 5 for d in range(12): 6 if d: 7 print() 8 print(f"On the {days[d]} day of Christmas,") 9 print("My true love sent to me:") 10 for g in range(d, -1, -1): 11 print("And a partridge in a pear tree." if g == 0 and d > 0 else gifts[g])