Search the Community

Showing results for tags 'projects'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • General
    • Show Us Your Creations
    • Blog
    • Recommended Reading
  • One Stop Programming Tutorials
    • Python Beginner Series
  • Programming Languages
    • Python
    • C++
    • C#
    • Arduino
    • Other Languages

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Rock Paper Scissors game made simply on Python. Very very simple, great project for beginners. Also an attached .py file def main(): import random botHand = random.randint(1,3) userHand = input("Pick rock, paper or scissors ") print("You pick " + userHand) if(botHand == 1): print("Computer picks scissors") elif(botHand == 2): print("Computer picks rock") elif(botHand == 3): print("Computer picks paper") import time time.sleep(2) if ((userHand == 'rock' or userHand == 'Rock')and botHand == 1): print('You win') elif ((userHand == 'rock' or userHand == 'Rock')and botHand == 2): print('You tie.') elif ((userHand == 'rock' or userHand == 'Rock')and botHand == 3): print('You lose.') elif ((userHand == 'paper' or userHand == 'Paper')and botHand == 1): print('You lose.') elif ((userHand == 'paper' or userHand == 'Paper')and botHand == 2): print('You win!') elif ((userHand == 'paper' or userHand == 'Paper')and botHand == 3): print('You tie.') elif ((userHand == 'scissors' or userHand == 'Scissors')and botHand == 1): print('You tie.') elif ((userHand == 'scissors' or userHand == 'Scissors')and botHand == 2): print('You lose.') elif ((userHand == 'scissors' or userHand == 'Scissors')and botHand == 3): print('You win!') else: print('INVALID input, try again') import time time.sleep(1) main() while (1==1): main() import time time.sleep(1) input('Press enter to start again') RockPaperScissors.py EDIT: For anyone wondering, yes I do know that I do not have to import the time module every single time, and I can import it once at the start. Just wanted to clear that with you guys.