Skip to content

Instantly share code, notes, and snippets.

@gpaulbr
Created May 24, 2019 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gpaulbr/d3d2c79648e688bbe5ab234613b04de1 to your computer and use it in GitHub Desktop.
Save gpaulbr/d3d2c79648e688bbe5ab234613b04de1 to your computer and use it in GitHub Desktop.
#coding: utf-8
class Frô:
def __init__(self, petalaLargura, petalaAltura, sepalaLargura, sepalaAltura, nome):
self.petalaAltura = petalaLargura
self.petalaAltura = petalaAltura
self.sepalaLargura = sepalaLargura
self.sepalaAltura = sepalaAltura
self.nome = nome
fros = []
file = "./iris.data"
with open(file, 'r') as file:
data = file.readlines()
for line in data:
array = line.split(",")
if len(array) >= 4:
fros.append(Frô(array[0], array[1], array[2], array[3], array[4]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment