Author Topic: I need help  (Read 2129 times)

0 Members and 1 Guest are viewing this topic.

Offline jb3navides

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
I need help
« on: May 28, 2013, 09:31:10 pm »
    if condition1 == "beef" or "lamb" or "venison", and condition2blv <= 5, and condition3 == "rare":
        print condition2blv * 20

the problem seems to be the comma after "venison"
When I run it in powershell (windows) there is an arrow pointing to the comma I mentioned
condition1, condition2blv, condition3 are all variables from past functions, (involves raw_input())

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: I need help
« Reply #1 on: May 28, 2013, 10:35:59 pm »
What language is this? I may be able to help.
It looks like Python because of the raw_input(). Try deleting the commas. Python only uses commas as separators in arguments.
to fix this, it would be
Code: [Select]
if (condition1=="beef" or condition1=="lamb" or condition1=="venison") and (condition2blv <= 5) and condition3=="rare":
    print condition2blv * 20
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline jb3navides

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 8
  • Rating: +0/-0
    • View Profile
Re: I need help
« Reply #2 on: May 29, 2013, 03:07:49 am »
Yes it is python and thanks for the help, I've been spamming my powershell terminal trying to figure it out.
 :banghead: :evillaugh: