Advertisement
RossitsaR

Deck of Cards

Mar 9th, 2022
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1.  
  2. value = input()
  3. intValue = 0
  4. i = 2
  5.  
  6. if value == "2" or value == "3" or value == "4" or value == "5" or value == "6" or value == "7" or value == "8" or value == "9" or value == "10":
  7. intValue = int(value)
  8. while i <= intValue:
  9. print(f'{i} of spades, {i} of clubs, {i} of hearts, {i} of diamonds')
  10. i += 1
  11. elif value == "J":
  12. while i <= 10:
  13. print(f'{i} of spades, {i} of clubs, {i} of hearts, {i} of diamonds')
  14. i += 1
  15. print(f'J of spades, J of clubs, J of hearts, J of diamonds')
  16. i += 1
  17. elif value == "Q":
  18. while i <= 10:
  19. print(f'{i} of spades, {i} of clubs, {i} of hearts, {i} of diamonds')
  20. i += 1
  21. print(f'J of spades, J of clubs, J of hearts, J of diamonds')
  22. i += 1
  23. print(f'Q of spades, Q of clubs, Q of hearts, Q of diamonds')
  24. i += 1
  25. elif value == "K":
  26. while i <= 10:
  27. print(f'{i} of spades, {i} of clubs, {i} of hearts, {i} of diamonds')
  28. i += 1
  29. print(f'J of spades, J of clubs, J of hearts, J of diamonds')
  30. i += 1
  31. print(f'Q of spades, Q of clubs, Q of hearts, Q of diamonds')
  32. i += 1
  33. print(f'K of spades, K of clubs, K of hearts, K of diamonds')
  34. i += 1
  35.  
  36. elif value == "A":
  37. while i <= 10:
  38. print(f'{i} of spades, {i} of clubs, {i} of hearts, {i} of diamonds')
  39. i += 1
  40. print(f'J of spades, J of clubs, J of hearts, J of diamonds')
  41. i += 1
  42. print(f'Q of spades, Q of clubs, Q of hearts, Q of diamonds')
  43. i += 1
  44. print(f'K of spades, K of clubs, K of hearts, K of diamonds')
  45. i += 1
  46. print(f'A of spades, A of clubs, A of hearts, A of diamonds')
  47. i += 1
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement