#making a program

23 messages · Page 1 of 1 (latest)

karmic storm
#

You have a few problems with your conditions

#

!tip if

zenith ventureBOT
#
Why Doesn't This Condition Work?
if age >= 12 and < 18:

and as well as or delineate distinct conditions. So you need to specify the variable in each condition in the statement. Like this

if age >= 12 and age < 18:

Additionally you can chain the greater than, less than, greater than or equal to, and less than or equal to. Like this

if 12 <= age < 18:
#

@unborn iron

ANDREW Uploaded Some Code
Uploaded these files to a Gist
karmic storm
#

So if number1 == 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 0 : should be if number1 == "1" or number1 == "2" or number1 == "3" or number1 == "4" or number1 == "5" or number1 == "6" or number1 == "7" or number1 == "8" or number1 == "9" or number1 == "0":

#

But of course that's stupid to do

unborn iron
#

I am still learning

#

Is there any other problem in my code

karmic storm
#

A much better way is to use in, or the built in isdigit, isnumeric, or isdecimal

karmic storm
unborn iron
#

I have really less knowledge 😅

#

I am learning python from a Crouse

#

But i wanted to make this project

#

And i used my all knowledge to in it

karmic storm
#

That's great

#

projects are the way to go

unborn iron
#

So can u tell me is there any other mistake in my code

karmic storm
#

There are a lot

unborn iron
#

😅

karmic storm
#

But I need to get ready to sleep soon so I won't have time to go through them

unborn iron
#

Can u tell me one mistake that is giving me the error