title: Rigged RNG Name Picker in Python 3.x
body: <p>I have a mate who is moving into a new flat who has asked if it was possible to build a 'rigged' on demand name picker for the flat rooms. I have built this so far but I am getting errors for cyclomatic complexity (I can understand that, there's like 30 if/else loops in a row). I was just wondering what the proper way to go about assigning random numbers to integers, comparing them and then listing them in ascending order to a string.</p>
  
  <p>The program should give anyone who enters a capital 'R' as their name a lower score therefore printing out that they choose the room last, once compared thru about 30 if/else statements to determine the which numbers are higher/lower (see below for example). The capital 'R' bit is so that you can enter everyones name in lowercase to prove the genuine randomness of the program, but then capitalize everyone's name on the real run thru (I'm sure there's sneakier techniques but its all I could come up with).</p>
  
  <p>I am getting cyclomatic complexity flags from the first is/else statement so am thinking the issue may arise from here</p>
  
  <pre><code>    `print("Hello")
  from random import seed
  from random import randint
  import time
  
  flatmate1 = "zero"
  flatmate2 = "zero"
  flatmate3 = "zero"
  flatmate4 = "zero"
  
  first = 0
  second = 0
  third = 0
  fourth = 0
  value1 = 0 
  value2 = 0
  value3 = 0
  value4 = 0
  name1 = 0
  name2 = 0
  name3 = 0
  name4 = 0
  
  flatmate1 = input("Enter flatmate 1 name:")
  flatmate2 = input("Enter flatmate 2 name:")
  flatmate3 = input("Enter flatmate 3 name:")
  flatmate4 = input("Enter flatmate 4 name:")
  
  print("Generating random numbers")
  time.sleep(2)
  
  
  if flatmate1[0] == ("R"): 
      value1 = randint(1, 20)
      name1 = value1
  else: name1 = randint(21, 100) 
  
  if flatmate2[0] == ("R"): 
      value2 = randint(1, 20)
      name2 = value2
  else: name2 = randint(21, 100) 
  
  if flatmate3[0] == ("R"): 
      value3 = randint(1, 20)
      name3 = value3
  else: name3 = randint(21, 100) 
  
  if flatmate4[0] == ("R"): 
      value4 = randint(1, 20)
      name4 = value4
  else: name4 = randint(21, 100) 
  
  print(name1, name2, name3, name4)
  print(flatmate1, flatmate2, flatmate3, flatmate4)
  
  
  if (name1 &gt; name2 and name3 and name4):
      print (flatmate1 + " chooses first")
      first = 1
  
  elif (name2 &gt; name3 and name4 and name1):
      print (flatmate2 + " chooses first")
      first = 2
  
  elif (name3 &gt; name4 and name1 and name2):
      print (flatmate3 + " chooses first")
      first = 3
  
  elif (name4 &gt; name1 and name2 and name3):
      print (flatmate4 + " chooses first")
      first = 4
  
  if first == 1:
      if (name2 &gt; name3 and name4):
          print (flatmate2 + " chooses second")
          second = 2
  
      elif (name3 &gt; name4 and name2):
          print (flatmate3 + " chooses second")
          second = 3
  
      elif (name4 &gt; name2 and name3):
          print (flatmate4 + " chooses second")
          second = 4    
  
  elif first == 2:
      if (name1 &gt; name3 and name4):
          print (flatmate1 + " chooses second")
          second = 1
  
      elif (name3 &gt; name4 and name1):
          print (flatmate3 + " chooses second")
          second = 3
  
      elif (name4 &gt; name1 and name3):
          print (flatmate4 + " chooses second")
          second = 4  
  
  elif first == 3:
      if (name1 &gt; name2 and name4):
          print (flatmate1 + " chooses second")
          second = 1
  
      elif (name2 &gt; name4 and name1):
          print (flatmate2 + " chooses second")
          second = 2
  
      elif (name4 &gt; name1 and name2):
          print (flatmate4 + " chooses second")
          second = 4
  
  elif first == 4:
      if (name1 &gt; name3 and name2):
          print (flatmate1 + " chooses second")
          second = 1
  
      elif (name3 &gt; name2 and name1):
          print (flatmate3 + " chooses second")
          second = 3
  
      elif (name2 &gt; name1 and name3):
          print (flatmate2 + " chooses second")
          second = 2
  
  if second == 1 and first == 2:
      if (name4 &gt; name2):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name3 &gt; name4):
          print (flatmate3 + " chooses third")
          third = 3
  
  elif second == 2 and first == 1:
      if (name4 &gt; name3):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name2 &gt; name4):
          print (flatmate2 + " chooses third")
          third = 2    
  
  elif second == 1 and first == 3:
      if (name4 &gt; name2):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name2 &gt; name4):
          print (flatmate2 + " chooses third")
          third = 2
  
  elif second == 3 and first == 1:
      if (name4 &gt; name2):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name2 &gt; name4):
          print (flatmate2 + " chooses third")
          third = 2
  
  elif second == 1 and first == 4:
  
      if (name2 &gt; name3):
          print (flatmate2 + " chooses third")
          third = 2
  
      elif (name3 &gt; name2):
          print (flatmate3 + " chooses third")
          third = 3
  
  elif second == 4 and first ==1:
  
      if (name2 &gt; name3):
          print (flatmate2 + " chooses third")
          third = 2
  
      elif (name3 &gt; name2):
          print (flatmate3 + " chooses third")
          third = 3
  
  elif second == 2 and first == 3:
      if (name4 &gt; name1):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name1 &gt; name4):
          print (flatmate1 + " chooses third")
          third = 1
  
  elif second == 3 and first == 2:
      if (name4 &gt; name1):
          print (flatmate4 + " chooses third")
          third = 4
  
      elif (name1 &gt; name4):
          print (flatmate1 + " chooses third")
          third = 1
  
  elif second == 2 and first == 4:
      if (name3 &gt; name1):
          print (flatmate3 + " chooses third")
          third = 3
      elif (name1 &gt; name3):
          print (flatmate1 + " chooses third")
          third = 1
  
  elif second == 4 and first == 2:
      if (name3 &gt; name1):
          print (flatmate3 + " chooses third")
          third = 3
      elif (name1 &gt; name3):
          print (flatmate1 + " chooses third")
          third = 1
  
  elif second == 3 and first == 4:
      if (name2 &gt; name1):
          print (flatmate2 + " chooses third")
          third = 2
  
      elif (name1 &gt; name2):
          print (flatmate1 + " chooses third")
          third = 1
  
  elif second == 4 and first == 3:
      if (name2 &gt; name1):
          print (flatmate2 + " chooses third")
          third = 2
  
      elif (name1 &gt; name2):
          print (flatmate1 + " chooses third")
          third = 1
  
  if (name1 &lt; name2 and name3 and name4):
      print(flatmate1 + " chooses last")
  elif (name2 &lt; name1 and name3 and name4):
      print(flatmate2 + " chooses last")
  elif (name3 &lt; name2 and name1 and name4):
      print(flatmate3 + " chooses last")
  elif (name4 &lt; name2 and name3 and name1):
      print(flatmate4 + " chooses last")
  
  numbers = [name1, name2, name3, name4] 
  numbers.sort(reverse=True) 
  print(numbers)`
  </code></pre>
  
  <p>Any help would be greatly appreciated</p>
  
  <p>*edited </p>