I have to write a Rock Paper Scissors game on python for my class but I can't figure out what I'm doing wrong if anyone wants to help me figure out what I'm doing wrong that would be great thanks
Python programming
[Print Screen] then [Ctrl+V] in ms paint
thanks that fixed it
The problem is that you're using python
How do I make an inventory database?
You gotta have rock, paper, and scissor factories or else you're gonna run out of materials.
f00 = "Item1"
f01 = "Item2"
f02 = "Item3"
f03 = "Item4"
f04 = "Item5"
f05 = "Item6"
f10 = "Item7"
f11 = "Item8"
f12 = "Item9"
f13 = "Item10"
f14 = "Item11"
f15 = "Item12"
v00 = 0
v01 = 0
v02 = 0
v03 = 0
v04 = 0
v05 = 0
v10 = 0
v11 = 0
v12 = 0
v13 = 0
v14 = 0
v15 = 0
def IncrementItem1():
v00 = v00 + 1
def IncrementItem2():
v01 = v01 + 1
....
def pickupItem():
if (pickedUpItem == f00):
statement("IncrementItem1")
elif (pickedUpItem == f01):
statement("IncrementItem2")
....
Lamer.
if you're having trouble figuring out how to take a screenshot, you might want to start somewhere else
Bit of coding practices advice. If you have a method that returns a value, you don't need to use else or even elif.
if (statement1)
return value1
if (statement2)
return value2
if (statement3)
return value3
That way your code stays linear and doesn't fork off into different branch possibilities.
google: happy path