Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #def czy_parzysta(liczba):
- # if liczba % 2 == 0:
- # print("parzysta")
- # else:
- # print("nieparzysta")
- #
- # for x in range(20):
- # czy_parzysta(x)
- ###
- #sentence = "the quick brown fox jumps over the lazy cat"
- #words = sentence.split()
- #word_lengths = [len(word) for word in words if word != "the"]
- #print(word_lengths)
- ###
- #x, z = 2, 3
- #z = [str((x**2, z*3)) for x in range(10) for z in range(7)]
- #print("\n".join(z))
- ###
- #z = [(x, y) for x in range(10) for y in range(10) if x!=y]
- #print(z)
- ###
- import csv
- import matplotlib.pyplot as plt
- def main():
- tab = []
- read_file('2cel.csv', tab)
- plt.plot(tab[:])
- plt.ylabel('some numbers');
- plt.show()
- def read_file(file_name, tab):
- with open('2cel.csv', newline='') as csvfile:
- plik = csv.reader(csvfile, delimiter=',')
- for row in plik:
- tab.append(float(row))
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement