JkSoftware

Day 4 - Challenge WhoPaysForTheFood

Nov 7th, 2021 (edited)
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  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.  
Add Comment
Please, Sign In to add comment