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()
1
A
回答
0
我認爲你遇到的問題是太多的論點,你想要做的就是讓它數學作業,我相信。
第10行newSuperhero = Superhero("Memphis May", "Teleportation", "Mind control", "Mathematics", "Homework")
你有哪些是導致你的問題。將其更改爲:
newSuperhero = Superhero("Memphis May", "Teleportation", "Mind control", "Mathematics homework.")
應該可以解決您的問題。
+1
我的老師說我需要使用main方法以外的函數並調用主函數方法。據她說,我沒有這樣做。我甚至不知道她的回答意味着什麼。 – Katherine
相關問題
- 1. Java對象和類 - 我的代碼有問題?
- 2. 一個C++的語法問題:類下面的代碼方法
- 3. 我的代碼有什麼問題?我無法把握的
- 4. 我的PHP代碼與遞歸方法有什麼問題?
- 5. JQuery的問題。每()和創建我有我的代碼問題決策樹
- 6. 我無法弄清楚我的Java代碼有什麼問題
- 7. 無法從我有我的代碼問題控制器
- 8. 我的代碼有什麼問題?
- 9. 我的mouseup代碼有什麼問題?
- 10. 我的onStart代碼有什麼問題?
- 11. 我的X11代碼有什麼問題?
- 12. 我的php代碼有什麼問題?
- 13. 我的java代碼有問題
- 14. 我的PHP代碼有什麼問題?
- 15. 我的代碼有什麼問題?
- 16. 我的視頻代碼有問題嗎?
- 17. 我的代碼有什麼問題?
- 18. 我的arduino代碼有什麼問題?
- 19. 我的代碼有什麼問題?
- 20. 我的AJAX代碼有什麼問題
- 21. 我的SceneJS代碼有什麼問題?
- 22. 我的代碼有什麼問題? 9
- 23. 我的Python代碼有什麼問題
- 24. 我的C++代碼有什麼問題?
- 25. xmlpullparser(),我的代碼有什麼問題?
- 26. 我的JavaScript代碼有什麼問題?
- 27. 我的代碼有什麼問題?
- 28. 我的C#代碼有什麼問題?
- 29. 我的代碼有什麼問題? countocolsonant
- 30. 我的php代碼有什麼問題?
你有什麼問題? –
那麼問題是什麼? –
請修復您的格式。最簡單的方法是直接從文本編輯器複製並粘貼,然後突出顯示該文本並按下cltr-k –