Add default introductory code example (#516)

Instead of having logic for a fallback in the backend, we're going to
actually add a snippet.
This commit is contained in:
Katrina Owen
2017-10-01 02:48:31 -06:00
committed by Tammo Behrends
parent 22fd5bce11
commit f7a5c3bb2d

10
docs/SNIPPET.txt Normal file
View File

@@ -0,0 +1,10 @@
prices = {'apple': 0.75, 'egg': 0.50}
cart = {
'apple': 1,
'egg': 6
}
bill = sum(prices[item] * cart[item]
for item in cart)
print(f'I have to pay {bill:.2f}')