Ejemplo n.º 1
0
def main():
    my_bug = b.Insect(4, 8, 0)

    print(my_bug.get_wings())
    print(my_bug.get_legs())

    print("This is how far the bug can fly: ", str(my_bug.flight_distance()))
Ejemplo n.º 2
0
def main():

    my_insect = ic.Insect(4, 8, 7)  # use the class name

    #print("My insect flew ",my_insect.get_flight(), " miles",sep='')
    #print("My insect has ",my_insect.get_legs(), " legs", sep='')
    #print("My insect has ",my_insect.get_wings(), " wings",sep='')
    print(my_insect.__str__())
Ejemplo n.º 3
0
def main():
    my_insect = i.Insect(2, 4, 0)
    print(my_insect)

    # Determine flight length
    my_insect.flightLength()

    # Print length of flight
    print("The insect can fly up to " + str(my_insect.get_flight()) +
          " miles.")
Ejemplo n.º 4
0
def main():

    my_insect = c.Insect(2, 4, 0)
    # numbers as parameter b/c add w,l,f to init function in class code
    my_insect.flight()

    # can also just call flight fuction in print statement

    print("The miles this insect can fly is:", my_insect.get_flight())

    print("The insect has ", my_insect.get_wings(), " wings.")

    print("The insect has ", my_insect.get_legs(), " legs.")
Ejemplo n.º 5
0
import InsectClass as i

fly = i.Insects()

print(type(fly))

print("The insect can fly up to: ", fly.flight_length(), "miles!")
Ejemplo n.º 6
0
def main():

    mosquitoe = i.Insect()

    print("A mosqitoe and can fly for", mosquitoe.flightLength(), "mile(s)")
Ejemplo n.º 7
0
import InsectClass as i

fly = i.Insect(2, 4, 0)

#print(fly)

print("The insect can fly up to", fly.flight_length(), "miles")

    

Ejemplo n.º 8
0
def main():

    this_fly = HouseFly.Insect(4, 8, 0)
    print(this_fly)
    print("This insect can fly", this_fly.flight_distance(), "miles")
Ejemplo n.º 9
0
import InsectClass as i

fly = i.Insect(4, 8, 0)

print(fly.get_wings())
print(fly.get_legs())

print("The insect can fly up to", str(fly.flight_length()), "miles.")
Ejemplo n.º 10
0
import InsectClass as ic

Mosquito = ic.Insect(4, 8, 0)
print(Mosquito)
print("The insect can fly up to", Mosquito.flight_length(), "miles")