-2

I am making a mini version of Russian Rullet. I have a code which gives me a random number from 1 - 36 but I also need to ask my program to randomly give either Red or Black?

from random import randint

print(randint(1,36))
print (randint ('Red', 'Black'))
mx0
  • 6,445
  • 12
  • 49
  • 54
Stiven Shyk
  • 23
  • 1
  • 7
  • you can use 0,1, *0* means Red, *1* means Black. – Vadim May 25 '17 at 19:58
  • This sounds like regular roulette. Isn't Russian roulette the thing where you have a revolver with one bullet loaded and take turns shooting yourself and hoping not to die? – user2357112 May 25 '17 at 20:01

2 Answers2

1

I wouldn't recommend this, but

from random import randint
print(["Red","Black"][randint(0,1)])
mtkilic
  • 1,213
  • 1
  • 12
  • 28
lhoworko
  • 1,191
  • 2
  • 13
  • 24
0

Check this

 a = randint(0,1)

 color = 'Red' if a == 1 else color == 'Black'

 print(color)
Vadim
  • 4,219
  • 1
  • 29
  • 44