November 2018
Beginner
424 pages
11h 43m
English

This appendix provides the solutions to the practice projects in each chapter. Digital versions are available on the book’s website at https://www.nostarch.com/impracticalpython/.
pig_Latin_practice.py
"""Turn a word into its Pig Latin equivalent."""import sysVOWELS = 'aeiouy'while True: word = input("Type a word and get its Pig Latin translation: ") if word[0] in VOWELS: pig_Latin = word + 'way' else: pig_Latin = word[1:] + word[0] + 'ay' print() print("{}".format(pig_Latin), file=sys.stderr) try_again = input("\n\nTry again? (Press Enter else ...