JkSoftware

Day 4 - Challenge WhoPaysForTheFood

Nov 7th, 2021 (edited)
158
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. # Split string method
  4. names_string = input("Give me everybody's names, separated by a comma. ")
  5. names = names_string.split(", ")
  6. #  Don't change the code above
  7. num = len(names) - 1
  8. num = random.randint(0, num)
  9. num = names[num]
  10. print(f"{num} Has to pay this time")
  11.  
  12. #Write your code below this line
  13.  
  14.  
  15.  
RAW Paste Data Copied