Sha256: 2f30e576acf9f6dc99b9dc392c501692be5ed95c972936a53548f13a5002b372

Contents?: true

Size: 177 Bytes

Versions: 139

Compression:

Stored size: 177 Bytes

Contents

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}')

Version data entries

139 entries across 139 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.77 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.76 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.75 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.74 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.73 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.72 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.71 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.70 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.69 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.68 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.67 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.66 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.65 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.64 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.63 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.62 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.61 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.60 tracks/python/docs/SNIPPET.txt
trackler-2.2.1.59 tracks/python/docs/SNIPPET.txt