1
0
forked from tdwojak/Python2017

zajecia 02.12.2017

This commit is contained in:
s45160 2017-12-02 15:42:37 +01:00
parent 1e4aea4ff3
commit 2c48227e49
3 changed files with 22 additions and 5 deletions

@ -1 +0,0 @@
Subproject commit 38093b25db7c1100877b9ae22ddb489c8124b4c3

View File

@ -1,6 +1,16 @@
def alfaRange(x, y):
for i in range(ord(x), ord(y)):
yield chr(i)
def Fibonacci(x):
for i in range(x):
if i==0 or i == 1:
a = 1
b = 1
yield 1
else:
temp = a
a += b
b = temp
yield a
for c in alfaRange('a', 'e'):
nr = 5
for c in Fibonacci(nr):
print(c)

8
labs03/task03.py Normal file
View File

@ -0,0 +1,8 @@
from requests import get
from json import loads
plik = get('https://api.fixer.io/latest')
plik_json = loads(plik.text)
waluta = 'PLN'
print(plik_json['rates'][waluta])