Jump to content

T8y8

Active Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by T8y8

  1. I recently started teaching myself python (after searching the threads for recommendations). Right now I am working on a Rock, Paper, Scissors program to mess around with if...then, definitions, and booleans, which is why the program might seem odd, I have the WIN/LOSE based off of Bool's, but I wanted to practice using them. Right now I'm trying to figure out a way to integrate a check to see if the player is actually putting in rock, paper, or scissors, but I haven't gotten anything to work yet. I have it checking for membership in the list picks, but I'm not sure how to make that 'reset' or try again. Any ideas? #!/usr/bin/env python # filename : rps.py # Author: T8y8 # A Rock, Paper, Scissors game #Imports import random import sys #Define Variables menu = ''' ================================= Welcome to Rock, Paper, Scissors! Press enter to continue Quit at anytime by typing 'quit' ================================= ''' picks = ['rock', 'paper', 'scissors'] #Computer Chooses def computerPick(): global compChoice compChoice = random.choice(picks) #Player Chooses def playerPick(): global playerChoice playerChoice = raw_input("Rock, Paper, or Scissors?") if playerChoice.lower() == 'quit': sys.exit() if playerChoice.lower() not in picks: print ' That is not an option' def choiceCompare(x, y): # X is Comp, Y is Person global win win = False if not win: if x == 'rock': if y.lower() == 'paper': win = True elif x == 'paper': if y.lower() == 'scissors': win = True elif x == 'scissors': if y.lower() == 'rock': win = True #Show menu c = raw_input(menu) # Game Loop while c != 'quit': computerPick() playerPick() choiceCompare(compChoice, playerChoice) if win is True: print "You beat %s with %s" % (compChoice, playerChoice) elif playerChoice == compChoice: print "YOU TIED WITH %s" % compChoice else: print "You lost to %s with %s" % (compChoice, playerChoice)
  2. I am a big fan of Asus products. My PDA, EEE, Tablet, and Mobo are all Asus, and all run very well. The new R1E (The upgrade of my R1F) is a sweet choice :)
  3. Could you throw some laptop specs at us? I run Ubuntu on my laptop almost exclusivly, running the 2.6.15-386 kernel, AIGLX + Compiz, IPW2915 wifi. Everything worked with little effort. I've heard Gentoo is great to really learn how linux works, but I don't think I'd recommend it as a first distro. Ubuntu.
  4. T8y8

    Do you code?

    QBASIC - FTW! HTML Sadly I've forgotten just about everything in either. I'd love to see a group-project, it'd be great for me to watch and learn.
  5. I've used T8y8 since my first net connection at AOL 3 or 4.0. Name - Tyler Birthyear - 1988 After getting impatient trying to come up with some screen name that has my name in it, even at 3.0, a million Tyler's already took everything, I threw T8y8 together, and alas, T8y8 was born. Every English Google result for T8y8, is me. :) It's pronounced Tee-Eight-Why-Eight. Not Tate-Yate :(
  6. T8y8

    Guns?

    I'm American, and I don't own a gun.
  7. T8y8

    Linux

    Everyone has already covered it, but yes, you can install both. I have Windows XP (NTFS) and Ubuntu 6.06 (JFS) installed on this laptop, each has an 18ish gig partition, and Ubuntu has a 1 gig swap partition.
  8. Hak.5 RealLifeForums My Teachers forums
  9. T8y8

    School Filter

    I also recently found out my school filters the word pr0n but not porn.
  10. T8y8

    School Filter

    I have my own proxy, sadly it's spread across the school, so I'm thinking of changing it. If they block the new proxy, they'll be blocking a teachers website that I run. I win! On another note, my school recently blocked YouTube They also blocked Google's Translation feature, so you can't use that loophole
  11. Laptop: My desktop's power supply blew out, gotta wait for the replacement before I can post it. :(
  12. And even then, it's Old testiment, which also says beating your wife is alright, and owning slaves is the 'in' thing.
  13. Comcast CDV for the win! On a serious note, this seems petty cool, but Skype never tickled my fancy, I use Gizmo for VOIP to VOIP, and CDV for VOIP-PSTN.
  14. I avoid Azereus like the plauge. I started with ABC, moved onto Arctic, and then settled on uTorrent.
  15. I'm a fan of Vegas as well. Pro isn't bad once you play with it, but Vegas has just got a spark in it.
  16. Psssh. It's like hearts. You want the low post count. :P
  17. I don't know about their recent machines, but I've had a PB last 10 years.
  18. My Gaming rig The Setup The Free Couch The TV w/ Xbox. The 360 is in the other room at the moment My Alphabatized Manga It used to look like this
×
×
  • Create New...