0

here is part of my code:

newvalue1 = difference + c
newvalue2 = difference + d
newvalue3 = difference2 + cc
newvalue4 = difference2 + dd

if dice == dice2
    print ("The scores on both dice remain constant, no changes are made.")

elif dice > dice2
    print("The scores of the two dice thrown are not the same. Here is the new strength value for", a, newvalue1, "and the skill value for", a, newvalue2)
    print("Here is the strength and skill values for", b, ". The strength value is", newvalue3, "and the skill value is", newvalue4)

elif dice > dice2
    print("The scores of the two dice thrown are not the same. Here is the new strength value for", a, newvalue1, "and the skill value for", a, newvalue2)
    print("Here is the strength and skill values for", b, ". The strength value is", newvalue3, "and the skill value is", newvalue4)

else:
    print ("I think we have an error!")

i want to code that if variables 'dice' and 'dice2' are equal then, refer to if statement - this is where the error is.
code is written in pyscriper, help very much appreciated.

Edited by zahra97

2
Contributors
1
Reply
17
Views
3 Years
Discussion Span
Last Post by Schol-R-LEA
1

Assumiong that this is the exact code you are running, the error is that you are omitting the colons following the if: and elif: conditionals.

Edited by Schol-R-LEA

Votes + Comments
I just tried that, still doesn't work :s
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.