Ejemplo n.º 1
0
from Bird import Bird
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Duck(Bird):
    feathers_color = 'green/white'
    fly_away_to_winter = True


duck_girl = Duck('f', get_random_weight(5))
duck_man = Duck('m', get_random_weight(8))

duck_girl.reproduce(duck_man)

duck_child = duck_girl.give_a_birth(get_random_sex(), get_random_weight(2))
Ejemplo n.º 2
0
from Bird import Bird
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Goose(Bird):
    feathers_color = 'white'
    fly_away_to_winter = True


goose_girl = Goose('f', get_random_weight(7))
goose_man = Goose('m', get_random_weight(10))

goose_girl.reproduce(goose_man)

goose_child = goose_girl.give_a_birth(get_random_sex(), get_random_weight(4))
Ejemplo n.º 3
0
from Mammal import Mammal
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight

class Pig(Mammal):
    has_fur = False
    likes_dirt = True

pig_girl = Pig('f', get_random_weight(150))
pig_man = Pig('m',  get_random_weight(220))

pig_girl.reproduce(pig_man)

piglet = pig_girl.give_a_birth(get_random_sex(), get_random_weight(40))
Ejemplo n.º 4
0
from Mammal import Mammal
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Cow(Mammal):
    has_horns = True


cow = Cow('f', get_random_weight(400))
bull = Cow('m', get_random_weight(400))

cow.reproduce(bull)
print('cow is pregnant', cow.it_pregnant)

calf = cow.give_a_birth(get_random_sex(), get_random_weight(100))
print('calf', calf)
print('calf.sex', calf.sex)
print('calf.weight', calf.weight)

print('cow.milk', cow.milk)
cow.wet_nurse(calf)

print('calf.weight after feed', calf.weight)
Ejemplo n.º 5
0
from Bird import Bird
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Chicken(Bird):
    feathers_color = 'white/red'
    fly_away_to_winter = False


chicken = Chicken('f', get_random_weight(2))
c**k = Chicken('m', get_random_weight(4))

chicken.reproduce(c**k)

cymbals = chicken.give_a_birth(get_random_sex(), get_random_weight(0.5))
Ejemplo n.º 6
0
from Mammal import Mammal
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Sheep(Mammal):
    herd_instinct = True


sheep = Sheep('f', get_random_weight(50))
ram = Sheep('m', get_random_weight(80))

sheep.reproduce(ram)

lamb = sheep.give_a_birth(get_random_sex(), get_random_weight(20))
Ejemplo n.º 7
0
from Mammal import Mammal
from get_random_sex import get_random_sex
from get_random_weight import get_random_weight


class Goat(Mammal):
    has_horns = True
    has_bread = True
    is_considered_a_symbol_of_the_devil = True


goat_girl = Goat('f', get_random_weight(50))
goat_man = Goat('m', get_random_weight(70))

goat_girl.reproduce(goat_man)

kid = goat_girl.give_a_birth(get_random_sex(), get_random_weight(20))