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()))
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__())
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.")
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.")
import InsectClass as i fly = i.Insects() print(type(fly)) print("The insect can fly up to: ", fly.flight_length(), "miles!")
def main(): mosquitoe = i.Insect() print("A mosqitoe and can fly for", mosquitoe.flightLength(), "mile(s)")
import InsectClass as i fly = i.Insect(2, 4, 0) #print(fly) print("The insect can fly up to", fly.flight_length(), "miles")
def main(): this_fly = HouseFly.Insect(4, 8, 0) print(this_fly) print("This insect can fly", this_fly.flight_distance(), "miles")
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.")
import InsectClass as ic Mosquito = ic.Insect(4, 8, 0) print(Mosquito) print("The insect can fly up to", Mosquito.flight_length(), "miles")