Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I don't know what is wrong!
#7
Two other things.

First, you also have this

        
elif (command == "dice"):
            print(diceValue)
            print()
but 'diceValue' is not available here. Perhaps add it here?

return hit_points - diceValue, diceValue
which will return a tupple, which you can access.

The second thing, and not a game changer, but you don't need the parenthesis in you're while, if's and elif's
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
RE: I don't know what is wrong! - by Mekire - Dec-16-2016, 08:31 PM
RE: I don't know what is wrong! - by wavic - Dec-16-2016, 08:37 PM
RE: I don't know what is wrong! - by Mekire - Dec-16-2016, 08:40 PM
RE: I don't know what is wrong! - by wavic - Dec-16-2016, 08:43 PM
RE: I don't know what is wrong! - by sparkz_alot - Dec-16-2016, 08:47 PM
RE: I don't know what is wrong! - by Mekire - Dec-16-2016, 08:51 PM
RE: I don't know what is wrong! - by wavic - Dec-16-2016, 08:57 PM
RE: I don't know what is wrong! - by Mekire - Dec-16-2016, 09:05 PM
RE: I don't know what is wrong! - by nilamo - Dec-16-2016, 09:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 5,360 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  python gives wrong string length and wrong character thienson30 2 4,131 Oct-15-2019, 08:54 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020