class Superhero:
def __init__(self, name = "", specialability = "", adversary = "", impotence = ""):
# Create a new superhero and give her characteristics.
self.name = name
self.specialability = specialability
self.adversary = adversary
self.impotence = impotence
def main():
newSuperhero = Superhero("Memphis May", "Teleportation", "Mind control", "Mathematics", "Homework")
print("Allow me to introduce you to my superhero, her name is " + newSuperhero.name)
print("She is extremely gifted and she was blessed with the following specialability's: " + newSuperhero.specialability)
print("Yet, she constantly faces her greatest adversary, " + newSuperhero.adversary)
print("Unfortunately, her biggest impotence is " + newSuperhero.impotence)
main()
Tags:
我觉得你现在的问题是争论太多了,你想做的是做数学作业,我相信。你知道吗
第十行
newSuperhero = Superhero("Memphis May", "Teleportation", "Mind control", "Mathematics", "Homework")
你所拥有的是什么导致了你的问题。更改为:newSuperhero = Superhero("Memphis May", "Teleportation", "Mind control", "Mathematics homework.")
应该可以解决您的问题。你知道吗相关问题 更多 >
编程相关推荐