Apr-30-2020, 07:22 AM
(Apr-29-2020, 05:23 PM)astral_travel Wrote: i wrote something like this, i hope it is what you wanted:
12345678numbers_list
=
[
1
,
3
,
5
,
7
,
9
]
choice
=
int
(
input
(
'please choose a number:'
))
if
choice
in
numbers_list:
(
'you just won !'
)
else
:
(
'you just lost amigo, try again !'
)
Yes, basically we have to use the
in
operator
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs