Coding Challenges in Python by Brian Spiering
Sample (from 268 notes)
|Front||Write a recursive factorial fucntion|
|Back||def factorialR(n): "Recursive factorial function" return 1 if n <= 1 else n * factorialR(n-1)|
|Front||Read a file from internet / website|
|Back||from urllib import requesturl = 'https://www.wolframcloud.com/objects/fd2da57e-2af0-4114-9d08-f45c062389d4' text = request.urlopen(url).read().decode("utf8") # NOTE: Convert from bytes to str|
|Front||write an interactive loop that prints input until stop|
|Back||while True: reply = raw_input('Enter text: ') if reply == 'stop': break print(reply.strip())|
After the file is downloaded, double-click on it to open it in the desktop program.
At this time, it is not possible to add shared decks directly to your AnkiWeb account - they need to be added from the desktop then synchronized to AnkiWeb.