Python 25 Line Challenge
 Python 25 Line Challenge codingCat Silly Frenchman Posts: 23 Threads: 2 Joined: May 2022 Reputation: May-02-2022, 01:11 PM I will get things started with one of my favorite chestnuts - Rock Paper Scissors in 24 lines (23 if you don't count the comment) ```#Rock Paper Scissors; Example for the 25 line challange; Matthew L. Parets from random import * print("Welcome to the game of Rock-Paper-Scissors. Good Luck!") print(" Enter 1 for Rock, 2 for Paper, and 3 for Scissors") user = int(input("Enter your choice: ")) comp = randint(1,3) if user == 1 and comp == 1: print("You choose Rock, Computer chooses Rock, Tie game.") elif user == 1 and comp == 2: print("You choose Rock, Computer chooses Paper, Ha Ha! You lose.") elif user == 1 and comp == 3: print("You choose Rock, Computer chooses Scissors, You Win!") elif user == 2 and comp == 1: print("You choose Paper, Computer chooses Rock, You Win!") elif user == 2 and comp == 2: print("You choose Paper, Computer chooses Paper, Tie game.") elif user == 2 and comp == 3: print("You choose Paper, Computer chooses Scissors, Ha Ha! You lose.") elif user == 3 and comp == 1: print("You choose Scissors, Computer chooses Rock, Ha Ha! You lose.") elif user == 3 and comp == 2: print("You choose Scissors, Computer chooses Paper, You Win!") else: print("You choose Scissors, Computer chooses Scissors, Tie game.")``` Reply

 Messages In This Thread Python 25 Line Challenge - by codingCat - May-02-2022, 01:08 PM RE: Python 25 Line Challenge - by codingCat - May-02-2022, 01:11 PM RE: Python 25 Line Challenge - by menator01 - May-02-2022, 08:02 PM RE: Python 25 Line Challenge - by codingCat - May-03-2022, 11:23 AM RE: Python 25 Line Challenge - by Gribouillis - May-03-2022, 12:24 PM RE: Python 25 Line Challenge - by codingCat - May-04-2022, 06:52 PM RE: Python 25 Line Challenge - by menator01 - May-03-2022, 07:49 PM RE: Python 25 Line Challenge - by codingCat - May-04-2022, 06:55 PM RE: Python 25 Line Challenge - by Gribouillis - May-03-2022, 09:24 PM RE: Python 25 Line Challenge - by codingCat - May-04-2022, 07:06 PM RE: Python 25 Line Challenge - by menator01 - May-05-2022, 07:10 PM RE: Python 25 Line Challenge - by Coricoco_fr - May-09-2022, 01:11 PM RE: Python 25 Line Challenge - by codingCat - May-09-2022, 02:27 PM RE: Python 25 Line Challenge - by menator01 - May-06-2022, 07:33 PM RE: Python 25 Line Challenge - by codingCat - May-09-2022, 11:49 AM RE: Python 25 Line Challenge - by codingCat - May-09-2022, 12:17 PM RE: Python 25 Line Challenge - by menator01 - May-09-2022, 06:04 PM RE: Python 25 Line Challenge - by codingCat - May-09-2022, 06:33 PM RE: Python 25 Line Challenge - by menator01 - May-09-2022, 06:36 PM RE: Python 25 Line Challenge - by Coricoco_fr - May-11-2022, 05:34 PM RE: Python 25 Line Challenge - by Gribouillis - May-09-2022, 06:30 PM RE: Python 25 Line Challenge - by menator01 - May-09-2022, 06:33 PM RE: Python 25 Line Challenge - by Gribouillis - May-09-2022, 06:51 PM RE: Python 25 Line Challenge - by menator01 - May-09-2022, 07:03 PM RE: Python 25 Line Challenge - by Gribouillis - May-09-2022, 07:07 PM RE: Python 25 Line Challenge - by codingCat - May-10-2022, 01:43 PM RE: Python 25 Line Challenge - by codingCat - May-10-2022, 02:55 PM RE: Python 25 Line Challenge - by Gribouillis - May-10-2022, 07:03 PM RE: Python 25 Line Challenge - by Gribouillis - May-11-2022, 05:51 AM RE: Python 25 Line Challenge - by codingCat - May-11-2022, 11:33 AM RE: Python 25 Line Challenge - by codingCat - May-12-2022, 07:10 PM RE: Python 25 Line Challenge - by codingCat - May-13-2022, 07:00 PM RE: Python 25 Line Challenge - by codingCat - May-17-2022, 01:50 PM RE: Python 25 Line Challenge - by codingCat - May-17-2022, 06:24 PM RE: Python 25 Line Challenge - by codingCat - May-18-2022, 07:17 PM

 Possibly Related Threads… Thread Author Replies Views Last Post Python 100 line Challenge codingCat 9 2,588 Jun-20-2022, 07:18 AM Last Post: Coricoco_fr Zen Python Challenge ichabod801 3 3,773 Aug-13-2018, 12:02 AM Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020