Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unexpected EOF during parsing

Status
Not open for further replies.

FriendlyFireX

Programmer
Aug 24, 2004
3
US
Hi, I'm new to these forums and I was hoping you guys could help me with a problem. My friend was writing a script in Python and he asked me to come over to debug his script. One of the problems was with the calculator part of his script. It will ask for say, 2 numbers to add. The prompt will read "enter the first number:" or something, and if you don't enter anything and push enter, you get an "unexpected EOF during parsing" error. I was wondering if there's any way to catch this, as we have tried multiple while/if combos/functions. I'll post the script if necessary.

Thanks in advance!
 
Yes, post the script. It will be difficult for us to determine what you need without it.

X
 
Script posted as requested:

# -*- coding: cp1252 -*-
print "Welcome to JBR_Enterprises Grand Pack of Junk 2!"
enter=raw_input("press the 'enter' key to start JBR_Enterprises Grand Pack of Junk 2")
while enter != "JBR":
print ""
print ""
print ""
print "==============================="
print "| 1) Friend Directory |"
print "| 2) JBR Calculator |"
print "| 3) JBR Commercials |"
print "| 4) Kingdom Haquers |"
print "| 5) Website on 'Code' |"
print "| 6) JBR_Enterprises' History |"
print "| 7) Help |"
print "| 8) Credits |"
print "| 9) Previews |"
print "==============================="
print ""
print "What choice? [put the number that is next to the choice]"
choice=raw_input("Which #? :")
if choice=="1":
print "In which way would you like to view the directory?"
print ""
print "==============================="
print "| 1) List: Alphabetical[last] |"
print "==============================="
print ""
print "What choice? [put the number that is next to the choice]"
subchoice=raw_input("Which #? :")
if subchoice=="1":
print "=============================="
print "| 1) Yvonne Acosta |"
print "| 2) Denise Acosta |"
print "| 3) Mathew Andranigian |"
print "| 4) Nathan Arrowwood |"
print "| 5) James Atkins |"
print "| 6) Bianca Avila |"
print "| 7) Justin Avne |"
print "| 8) Kristin Battersby |"
print "| 9) Stephanie Belen |"
print "| 10) Jaime Bernardino |"
print "| 11) Stephanie Biggs |"
print "| 12) Cameron Blair |"
print "| 13) Shane Blosat |"
print "| 14) Sarmad Bokhari |"
print "| 15) Stephanie Bootsma |"
print "| 16) Austin Bower |"
print "| 17) Renee Boyd |"
print "| 18) Katie Boyle |"
print "| 19) Amelia Bronski |"
print "| 20) Stuart Brown |"
print "| 21) Howard Buchanan |"
print "| 22) Krystle Bush |"
print "| 23) Matthew Campbell |"
print "| 24) Candace Cavin |"
print "| 25) Kara Chamberz |"
print "| 26) Hannah Champlin |"
print "| 27) Alissa Clark |"
print "| 28) Sarah Clark |"
print "| 29) Courtney Clarry |"
print "| 30) Morgan Corning |"
print "| 31) Christian Coronado |"
print "| 32) Matthew Corral |"
print "| 33) Grant Cotting |"
print "| 34) Jessica Couch |"
print "| 35) Stephanie Couch |"
print "| 36) Christina County |"
print "| 37) Detoia Cozy |"
print "| 38) Chelsea Craddock |"
print "| 39) Natalie Cragin |"
print "| 40) Amanda Creacy |"
print "| 41) Benjamin Cremer |"
print "| 42) Therese Crews |"
print "| 43) Danielle Croll |"
print "| 44) Kathleen Cunningham |"
print "| 45) Ashley Curry |"
print "| 46) David Daerr |"
print "| 47) Danae Daniel |"
print "| 48) Jessica Davis |"
print "| 49) Kelsie Davis |"
print "| 50) Nathan De Los Santos |"
print "| 51) Jordan Deal |"
print "| 52) Brittney Degrote |"
print "| 53) Mallory Dies |"
print "| 54) Lindsey Dolen |"
print "| 55) Lauren Dominguez |"
print "| 56) Mindy Dormer |"
print "| 57) Jessielee Dye |"
print "| 58) Candace Eddy |"
print "| 59) Tristen Elsberry |"
print "| 60) Scott Fitter |"
print "| 61) Aaron Flores |"
print "| 62) John Foster |"
print "| 63) Christine Foxx |"
print "| 64) Robert Gallardo |"
print "| 65) Christine Garcia |"
print "| 66) Jonathan Garcia |"
print "| 67) Michael Giles |"
print "| 68) Freddy Gonzalez |"
print "| 69) Sommer Gordon |"
print "| 70) Lisa Gorta |"
print "| 71) Michael Grabendike |"
print "| 72) Kasandra Green |"
print "| 73) Austin Hagman |"
print "| 74) Amber Harper |"
print "| 75) Heather Herring |"
print "| 76) Conner Hicks |"
print "| 77) Benjamin Hill |"
print "| 78) Brett Hoag |"
print "| 79) Toney Hodnettcordier |"
print "| 80) Holly Holcomb |"
print "| 81) Adam Hoult |"
print "| 82) Amanda Hounsley |"
print "| 83) Kevin Huynh |"
print "| 84) Catherine Irving |"
print "| 85) Brandon Jackson |"
print "| 86) Lucius Jackson |"
print "| 87) Kristen Jaggers |"
print "| 88) Matthew Jackstis |"
print "| 89) Ashley Jones |"
print "| 90) Dow Jones |"
print "| 91) Christina Khassmattas |"
print "| 92) Flora Kim |"
print "| 93) Kelsy Kingston |"
print "| 94) Neely Knuth |"
print "| 95) Vanessa Lee |"
print "| 96) Morgan Leinen |"
print "| 97) Laura Lema |"
print "| 98) Kelsy Lewis |"
print "| 99) Amanda Logan |"
print "| 100) Kristin Long |"
print "| 101) Bekki Lorton |"
print "| 102) Jessica Luna |"
print "| 103) Jonathan Macias |"
print "| 104) Jordan Macias |"
print "| 105) Rassel Maclaughlin |"
print "| 106) Michael Marchek |"
print "| 107) Francisco Marquez |"
print "| 108) Elyssa Marshall |"
print "| 109) Andrea Martin |"
print "| 110) Kamri Massingale |"
print "| 111) Cody McAllister |"
print "| 112) Samantha McBride |"
print "| 113) Kelli McCrea |"
print "| 114) Christian Medero |"
print "| 115) Armand Mendez |"
print "| 116) Alberto Mendez |"
print "| 117) Miguel Mendoza |"
print "| 118) Andrea Miller |"
print "| 119) Jessica Minx |"
print "| 120) Cindy Montoya |"
print "| 121) Dominique Moomaw |"
print "| 122) Jessica Moorecariveau |"
print "| 123) Paula Mora |"
print "| 124) Allison Morgen |"
print "| 125) Madison Morrow |"
print "| 126) Jehrid Mosley |"
print "| 127) Denise Murray |"
print "| 128) Ashkan Nahreini |"
print "| 129) Jessica Naval |"
print "| 130) Hayley Netzer |"
print "| 131) Kristina Nevares |"
print "| 132) Stacy Nguyen |"
print "| 133) Nicole Ortiz |"
print "| 134) Anthony Owusu |"
print "| 135) Amanda Papp |"
print "| 136) Radhika Patel |"
print "| 137) Raj Patel |"
print "| 138) Camille Peg |"
print "| 139) Christina Perkins |"
print "| 140) John Pham |"
print "| 141) Cassandra Phillips |"
print "| 142) Michael Phillips |"
print "| 143) Madeline Pines |"
print "| 144) Allison Plebani |"
print "| 145) Austin Quick |"
print "| 146) Jeffrey Rambo |"
print "| 147) Jesse Ramirez |"
print "| 148) Amanda Reed |"
print "| 149) Aaron [Bryce] Renfeldt|"
print "| 150) Kyle Riley |"
print "| 151) Matthew Rivera |"
print "| 152) Ryan Robertson |"
print "| 153) Tiffany Rodman |"
print "| 154) Raquel Rossow |"
print "| 155) Natalie Ruiz |"
print "| 156) Mark Ryan |"
print "| 157) Jesse Sanderson |"
print "| 158) Luis Sanz |"
print "| 159) Melissa Saunders |"
print "| 160) Markis Sayles |"
print "| 161) Kristian Scott |"
print "| 162) Nicholas Seetashith |"
print "| 163) Molly Seyednematollah |"
print "| 164) Lucas Shaffer |"
print "| 165) Megan Shepard |"
print "| 166) Ashley Shoemaker |"
print "| 167) Jessica Siegall |"
print "| 168) Dontai Smith |"
print "| 169) Derek Spain |"
print "| 170) Sheridan Spence |"
print "| 171) Cory Spolar |"
print "| 172) Shannon Stampwala |"
print "| 173) Lisa Straehley |"
print "| 174) Brandon Stuhl |"
print "| 175) Julius Tate |"
print "| 176) Ashley Taylor |"
print "| 177) Jason To |"
print "| 178) Kimberly Trajano |"
print "| 179) Tiffany Tran |"
print "| 180) Marissa Travers |"
print "| 181) Danielle Treece |"
print "| 182) Sergey Varlitskiy |"
print "| 183) Melissa Vasquez |"
print "| 184) Jocelyn Vega |"
print "| 185) Toan Vo |"
print "| 186) Christin Vu |"
print "| 187) Brytni Walker |"
print "| 188) Daniel Weiss |"
print "| 189) Anja Weltin |"
print "| 190) Jazziymn West |"
print "| 191) Joanna West |"
print "| 192) Elizabeth Whalen |"
print "| 193) Cecie White |"
print "| 194) Karen White |"
print "| 195) Samayyah Williams |"
print "| 196) David Wilson |"
print "| 197) Jarrid Wittkopf |"
print "| 198) Stephanie Worley |"
print "| 199) Amanda Wright |"
print "| 200) Jasmine Zahir |"
print "| 201) Jessica Zannitto |"
print "| 202) Christy Zuo |"
print "=============================="
print ""
print "(At a later point in time, you will be able to read descriptions)"
enter=raw_input("Press enter to go on back to the main options!")
elif subchoice=="2":
print "Yvonne Acosta"
print "Denise Acosta"
print "Mathew Andranigian"
print "Nathan Arrowwood"
print "James Atkins"
print "Bianca Avila"
print "Justin Avne"
print "Kristin Battersby"
print "Stephanie Belen"
print "Jaime Bernardino"
print "Stephanie Biggs"
print "Cameron Blair"
print "Shane Blosat"
print "Sarmad Bokhari"
print "Stephanie Bootsma"
print "Austin Bower"
print "Renee Boyd"
print "Katie Boyle"
print "Amelia Bronski"
print "Stuart Brown"
print "Howard Buchanan"
print "Krystle Bush"
print "Matthew Campbell"
print "Candace Cavin"
print "Kara Chamberz"
print "Hannah Champlin"
print "Alissa Clark"
print "Sarah Clark"
print "Courtney Clarry"
print "Morgan Corning"
print "Christian Coronado"
print "Matthew Corral"
print "Grant Cotting"
print "Jessica Couch"
print "Stephanie Couch"
print "Christina County"
print "Detoia Cozy"
print "Chelsea Craddock"
print "Natalie Cragin"
print "Amanda Creacy"
print "Benjamin Cremer"
print "Therese Crews"
print "Danielle Croll"
print "Kathleen Cunningham"
print "Ashley Curry"
print "David Daerr"
print "Danae Daniel"
print "Jessica Davis"
print "Kelsie Davis"
print "Nathan De Los Santos"
print "Jordan Deal"
print "Brittney Degrote"
print "Mallory Dies"
print "Lindsey Dolen"
print "Lauren Dominguez"
print "Mindy Dormer"
print "Jessielee Dye"
print "Candace Eddy"
print "Tristen Elsberry"
print "Scott Fitter"
print "Aaron Flores"
print "John Foster"
print "Christine Foxx"
print "Robert Gallardo"
print "Christine Garcia"
print "Jonathan Garcia"
print "Michael Giles"
print "Freddy Gonzalez"
print "Sommer Gordon"
print "Lisa Gorta"
print "Michael Grabendike"
print "Kasandra Green"
print "Austin Hagman"
print "Amber Harper"
print "Heather Herring"
print "Conner Hicks"
print "Benjamin Hill"
print "Brett Hoag"
print "Toney Hodnettcordier"
print "Holly Holcomb"
print "Adam Hoult"
print "Amanda Hounsley"
print "Kevin Huynh"
print "Catherine Irving"
print "Brandon Jackson"
print "Lucius Jackson"
print "Kristen Jaggers"
print "Matthew Jackstis"
print "Ashley Jones"
print "Dow Jones"
print "Christina Khassmattas"
print "Flora Kim"
print "Kelsy Kingston"
print "Neely Knuth"
print "Vanessa Lee"
print "Morgan Leinen"
print "Laura Lema"
print "Kelsy Lewis"
print "Amanda Logan"
print "Kristin Long"
print "Bekki Lorton"
print "Jessica Luna"
print "Jonathan Macias"
print "Jordan Macias"
print "Rassel Maclaughlin"
print "Michael Marchek"
print "Francisco Marquez"
print "Elyssa Marshall"
print "Andrea Martin"
print "Kamri Massingale"
print "Cody McAllister"
print "Samantha McBride"
print "Kelli McCrea"
print "Christian Medero"
print "Armand Mendez"
print "Alberto Mendez"
print "Miguel Mendoza"
print "Andrea Miller"
print "Jessica Minx"
print "Cindy Montoya"
print "Dominique Moomaw"
print "Jessica Moorecariveau"
print "Paula Mora"
print "Allison Morgen"
print "Madison Morrow"
print "Jehrid Mosley"
print "Denise Murray"
print "Ashkan Nahreini"
print "Jessica Naval"
print "Hayley Netzer"
print "Kristina Nevares"
print "Stacy Nguyen"
print "Nicole Ortiz"
print "Anthony Owusu"
print "Amanda Papp"
print "Radhika Patel"
print "Raj Patel"
print "Camille Peg"
print "Christina Perkins"
print "John Pham"
print "Cassandra Phillips"
print "Michael Phillips"
print "Madeline Pines"
print "Allison Plebani"
print "Austin Quick"
print "Jeffrey Rambo"
print "Jesse Ramirez"
print "Amanda Reed"
print "Aaron [Bryce] Renfeldt"
print "Kyle Riley"
print "Matthew Rivera"
print "Ryan Robertson"
print "Tiffany Rodman"
print "Raquel Rossow"
print "Natalie Ruiz"
print "Mark Ryan"
print "Jesse Sanderson"
print "Luis Sanz"
print "Melissa Saunders"
print "Markis Sayles"
print "Kristian Scott"
print "Nicholas Seetashith"
print "Malousak [Molly] Seyednematollah"
print "Lucas Shaffer"
print "Megan Shepard"
print "Ashley Shoemaker"
print "Jessica Siegall"
print "Dontai Smith"
print "Derek Spain"
print "Sheridan Spence"
print "Cory Spolar"
print "Shannon Stampwala"
print "Lisa Straehley"
print "Brandon Stuhl"
print "Julius Tate"
print "Ashley Taylor"
print "Jason To"
print "Kimberly Trajano"
print "Tiffany Tran"
print "Marissa Travers"
print "Danielle Treece"
print "Sergey Varlitskiy"
print "Melissa Vasquez"
print "Jocelyn Vega"
print "Toan Vo"
print "Christin Vu"
print "Brytni Walker"
print "Daniel Weiss"
print "Anja Weltin"
print "Jazziymn West"
print "Joanna West"
print "Elizabeth Whalen"
print "Cecie White"
print "Karen White"
print "Samayyah Williams"
print "David Wilson"
print "Jarrid Wittkopf"
print "Stephanie Worley"
print "Amanda Wright"
print "Jasmine Zahir"
print "Jessica Zannitto"
print "Christy Zuo"
elif choice=="2":
choice=raw_input("Begin? [ 1) Yes, 2) No ] : ")
if choice=="1":
print ""
print "Welcome to the JBR Interaction Calculator 7.0. Please choose the one of the options below to begin..."
while choice!="JBR":
print ""
print ""
print "================================"
print "| 1) Addition |"
print "| 2) Subtraction |"
print "| 3) Multiplication |"
print "| 4) Division |"
print "| 5) Area Finder |"
print "| 6) Peremeter Finder |"
print "| 7) Other Calcualtor Functions|"
print "| JBR) To Quit |"
print "================================"
print ""
print ""
choice=raw_input("Which Choice? : ")
if choice=="1":
print ""
choice=raw_input("How many numbers do you want to add together? 2, 3, 4, 5, 6? : ")
if choice=="2":
a=input("first number: ")
b=input("second number: ")
if a=="" or " " or " ":
print "Not an option"

x=a+b
print "The answer is",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="3":
print "3 numbers will be required"
a=input("First number: ")
b=input("Second Number: ")
c=input("Third number: ")
x=a+b+c
print "answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
print "4 Numbers required"
a=input("First number: ")
b=input("Second number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
x=a+b+c+d
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="5":
print "5 Numbers required"
a=input("First number: ")
b=input("Second number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
x=a+b+c+d+e
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="6":
print "6 Numbers required"
a=input("First number: ")
b=input("Second number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
f=input("Sixth Number: ")
x=a+b+c+d+e+f
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="2":
print ""
choice=raw_input("How many numbers? 2, 3, 4? : ")
if choice=="2":
a=input("First number: ")
b=input("Second Number: ")
x=a-b
print "The answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="3":
a=input("First number: ")
b=input("Second Number: ")
c=input("Third Number: ")
x=a-b-c
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
a=input("First number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
x=a-b-c-d
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="3":
print ""
choice=raw_input("How many numbers? 2,3,4,5 : ")
if choice=="2":
a=input("Number 1: ")
b=input("Number 2: ")
x=a*b
print "Answer=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="3":
a=input("First: ")
b=input("Second: ")
c=input("Third: ")
x=a*b*c
print "ANSWER=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
a=input("First: ")
b=input("Second: ")
c=input("Third: ")
d=input("Fourth: ")
x=a*b*c*d
print "ANSWER=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="5":
a=input("First: ")
b=input("Second: ")
c=input("Third: ")
d=input("Fourth: ")
e=input("Fifth: ")
x=a*b*c*d*e
print "ANSWER=",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
print ""
a=input("First Number: ")
print "Divided by..."
b=input("Second Number: ")
x=a*2.000000000000000
y=b*2.000000000000000
z=x/y
print "ANSWER=",z
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="5":
print ""
area=raw_input("What shape? 1>square, 2>triangle, 3>rectangle, 4>Circle : ")
if area=="1":
square=input("Put one sides length in: ")
x=square*square
print "The area is",x,"units squared"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif area=="2":
triangle=input("Put in base : ")
t=input("Put in height : ")
x=triangle*t/2
print "Area is",x,"units squared"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif area=="3":
rectangle=input("Put in a long side length : ")
r2=input("Put in a short side : ")
x=rectangle*r2
print "Area is",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif area=="4":
print "What would you like to calculate from? DIAMETER or RADIUS?"
DorR=raw_input("1>Diameter, 2>Radius : ")
if DorR=="1":
d=input("Put in Diameter : ")
area=(d/2)**2*3.14
print "The area of the circle is",area,"units squared."
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif DorR=="2":
r=input("Put in Radius : ")
area=(r**2)*3.14
print "The area is",area,"units squared."
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="6":
print ""
peremeter=raw_input("What shape? 1>triangie,2>square,3>rectangle, 4>Circle, 5>Other : ")
if peremeter=="1":
p1=input("side 1 : ")
p2=input("side 2 : ")
p3=input("Third side? : ")
x=p1+p2+p3
print "peremeter=",x,"units"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif peremeter=="2":
square=input("side 1 : ")
x=square*4
print "peremeter=",x,"units"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif peremeter=="3":
SA=input("side(long)? : ")
SB=input("shorter side? : ")
x=SA*2+SB*2
print "peremeter is",x,"units"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif peremeter=="4":
print " How do you want to find the peremeter?"
DorR=raw_input("1>Diameter or 2>Radius : ")
if DorR=="1":
d=input("Diameter? : ")
perem=d*3.14
print "Answer is",perem,", this is the circumphrance"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif DorR=="2":
r=input("Radius? : ")
perem=r*2*3.14
print "Circumphrance is",perem,"."
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif peremeter=="5":
sides=raw_input("How many sides are on this object? 5, 6, 7, 8, 9, 10? : ")
if sides=="5":
print "Insert the needed sides:"
s10=0
s9=0
s8=0
s7=0
s6=0
elif sides=="6":
s6=input("Put in the sixth side:")
s10=0
s9=0
s8=0
s7=0
elif sides=="7":
s7=input("Put in the seventh side:")
s6=input("Put in the Sixth side:")
s10=0
s9=0
s8=0
elif sides=="8":
s8=input("Put in eigth side:")
s7=input("Put in seventh side:")
s6=input("Put in sixth side:")
s10=0
s9=0
elif sides=="9":
s9=input("Put in ninth side:")
s8=input("Put in eigth side:")
s7=input("Put in seventh side:")
s6=input("Put in sixth side:")
s10=0
elif sides=="10":
s10=input("Put in tenth side:")
s9=input("Put in ninth side:")
s8=input("Put in eigth side:")
s7=input("Put in seventh side:")
s6=input("Put in sixth side:")
s5=input("Put in fifth side:")
s4=input("Put in fourth side:")
s3=input("Put in third side:")
s2=input("Put in second side:")
s1=input("Put in first side:")
x=s10+s9+s8+s7+s6+s5+s4+s3+s2+s1
print "The peremeter is",x,"units"
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="7":
print ""
print "================================="
print "|1)Degree Finder (Total Shape) |"
print "|2)Percentage Finder |"
print "|3)Mean Finder |"
print "|4)'Guess the number' game |"
print "================================="
print ""
choice=raw_input(" What choice? : ")
if choice=="1":
print ""
print "This will find out how many degrees total there are in a shape"
a=input("Put in number of sides : ")
b=a-2
x=b*180
print "There are this many degrees:",x
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="2":
print ""
a=input("Partial Number: ")
b=input("Total Number: ")
c=a*1.000
d=b*1.000
y=c/d
x=y*100
print "You got",x,"%"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="3":
print ""
choice=raw_input("How many numbers do you need to find the mean of?(Mind you it is an average)Type in a number 3-9 : ")
if choice=="3":
a=input("First number?: ")
b=input("Second Number: ")
c=input("Third Number: ")
x=a+b+c
y=x/3.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
x=a+b+c+d
y=x/4.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="5":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
x=a+b+c+d+e
y=x/5.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="6":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
f=input("Sixth Number: ")
x=a+b+c+d+e+f
y=x/6.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="7":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
f=input("Sixth Number: ")
g=input("Seventh Number: ")
x=a+b+c+d+e+f+g
y=x/7.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="8":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
f=input("Sixth Number: ")
g=input("Seventh Number: ")
h=input("Eigth Number: ")
x=a+b+c+d+e+f+g+h
y=x/8.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="9":
a=input("First Number: ")
b=input("Second Number: ")
c=input("Third Number: ")
d=input("Fourth Number: ")
e=input("Fifth Number: ")
f=input("Sixth Number: ")
g=input("Seventh Number: ")
h=input("Eigth Number: ")
i=input("Ninth Number: ")
x=a+b+c+d+e+f+g+h+i
y=x/9.00000
print "The mean is",y
print ""
enter=raw_input("Press enter to go on back to the main options!")
else:
print "Wasn't a choice..."
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="4":
print ""
print "Try to find the number I am thinking of (1-50)..."
password= "JBR"
while password != "27":
password = raw_input("Number?:")
print "You got it!"
print ""
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="JBR":
print ""
print "Thank you for using the JBR_Enterprises Calculator!"
print ""
blah=raw_input("To Turn off, press 'enter'")
print ""
else:
print ""
print "Not an option"
enter=raw_input("Press enter to go on back to the main options!")
elif choice=="2":
print "Okay, see you later!"
print ""
choice=raw_input("Press enter to exit")
else:
print "Whatever, if you don't cooperate, you get kicked out!"
enter=raw_input("Press enter to leave! You uncooperative fool! : ")
print ""
elif choice=="3":
print ""
print "With your Grand Pack of Junk 2 CD/Floppy, comes commercials. These commercials will have shortcuts leading to them, but just in case they don't, look into the 'commercials' folder and choose."
print ""
enter=raw_input("Press 'enter' to return to main screen")
elif choice=="4":
print ""
print "If you haven't yet noticed, your JBR_Enterprises Grand Pack of Junk 2! comes with a .exe (program) file. This will allow you to play a demo of Kingdom Haquers (JBR_Enterprises new game). It will be released full version with the release of 'Grand Pack of Junk 3: Ultimate Fun!'"
print ""
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif choice=="5":
print "JBR_Enterprises bids you welcome to the brand new site!"
print "This site is built around you! So have fun!"
print "================================="
print "| 1)Tv Articles/Reviews |"
print "| 2)Video Game Articles/Reviews |"
print "| 3)Movie Articles/Reviews |"
print "| 4)Book Articles/Reviews |"
print "| 5)Short Storys |"
print "| 6)Mottos of JBR_Enterprises |"
print "| 7)The 'Great Links List' |"
print "================================="
print ""
print "Which option do you wish to view?"
subchoice=raw_input("Which one? :")
if subchoice=="1":
print "Which article do you wish to see?"
print "================================="
print "| 1)X-Files |"
print "================================="
print ""
print "Which Article?"
choice=raw_input("Which :")
if choice=="1":
print ""
print "The X-Files is a terrific show that has drama, suspense, and a whole bunch of other things. The X-Files is the type of show that takes you and never lets you go until the end. The staring characters are David Duchovny as Fox Mulder, Gillian Anderson as Daina Scully, and Mitch Peggi as Walter Skinner. It all starts in the basement of the F.B.I. building in Washington D.C., Mulder and Scully meet for the first time."
print "(by: Amanda)"
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="2":
print "These are the video games articles..."
print "================================="
print "| 1)…Another PS? |"
print "| 2)Valve Steam, Impressions |"
print "| 3)Wise Gamer Thoughts |"
print "================================="
print ""
print "Which article do you want to view?"
choice=raw_input("Which? :")
if choice=="1":
print ""
print "Yes…you read right. Another. You may be thinking we are not updated, but we know that PS2 has come out already. But, what if we are not speaking of this? No, no, what we are speaking of is the newest model of PS, called the PSX. This system is not yet available, but is being tested, and should be available between a year and two. This information has been gathered over several interviews with the PS makers. This system will be more advance, still play all previous Playstation games, and of course connects to the Internet. Unlike the original games of past Playstations, most games will now be made for Internet gaming only. The Playstation (Sony) company has given another surprise. They will also be releasing a GBA type thing (a handheld console). Adapters will be sold to connect previous console games to this, but more games will be added. These new games will most likely be newer versions of old, but nothing can be predicted about Sony. When more info is gathered it will be here. Until then…bye!"
print "(by: JBR)"
elif choice=="2":
print ""
print "For the past few days I have been playing Counter-Strike 1.6 BETA. And to do so, I would have to use Steam. For those of you who don't know, Steam is VALVe Software's large online network, and a delivery system for new online content. It's a great system in theory, but whether it's a great system in practice is discussed below. To start off, you download a nice large installation file for Steam. When I say large, I mean large. It was ~750 MBs for the full installation, but I (wisely) opted for the ~350 MP Counter-Strike only installation. Due to it's size, it'll rule out most dial-up users, with only the hardcore modem crowd remaining. Once that is done, it's the usual Windows setup affair: double-click, point to directory, and wait. I had to do this twice, as it said that I prolly did not have enough HD space the first time. So I went around and removed about a gig of stuff, and tried again. It was a success, and I proceeded to register online. Typical stuff (e-mail, internet connection, whatnot), and created a profile. A profile consists of an account name (which is your e-mail address) and a pass. I logged in, and was treated to a nice Windows-esque interface (see the super-compressed screenie for an idea of what it looks like). Pretty spiffy, I thought, and proceeded to click on 'Games', then Counter-Strike. After an 'interesting' load time while it downloaded some content, I was treated to a not so familiar startup screen. They revamped the CS start screen. In my opinion, most of these changes were cosmetic. Anyway, this isn't a review of CS 1.6 (that'll be for later), so I'll stick to Steam. During the installation, I chose for Steam to overwrite CS data, since it said that my settings and models and such would be preserved. My settings weren't preserved, and my 1.5 models weren't compatible with 1.6. Minor quibbles. The options menu and in-game server seach now feature those Steam style windows, and the server seach has fewer options than before. Also, when joining a server, they go through a nice process of 'Validating Game Resources,' which I don't see the point in; all it does is extend (very much so) the connecting time. I timed out a couple times, to give you an idea of how long this takes. After that, I played some CS on mainly de_dust, de_dust2, and de_aztec (my fav maps). Fixed some controls, and I was set to play for days. And I was, except Steam turned up a few bugs. You see, it takes quite a bit of your box's resources to run Steam. Also, if you shut down Windows while steam is still running, it will have to check your hard drive's cache the next time it runs. Translation: You have to wait about 15 minutes while it checks. If you cancel, you'll just have to start over next time. I figured this out after looking on the Steam forums, and by that time I had already restarted the process 4 or 5 times. Buggy. Steam also somehow screwed up some of my files, and after looking on the forums, it turns out I had to reinstall. How delightful (repeat the above process, minus the control configuring). After that, however, it was pretty much smooth sailing (though I hate the 'Validating Game Resources' thing). All in all, CS 1.6 was worth reinvigorating my affair with CS, and worth the time spent with Steam. Steam is a great idea, and once they iron out the bugs mentioned above, I'll have no problems using it. It is rather enjoyable, as it includes snazzy features including changeable skins and an AIM-ish friend system. Counter-Strike: Condition Zero will also be available via Steam, upping it's use. reports that about 50% of the peoples have gone Steam, and when they fix the little things, I expect that number to double. I am currently playing: Counter-Strike 1.6 BETA, Black & White, Diablo II: Lord of Destruction, and Startopia."
print "(by: Trent)"
elif choice=="3":
print ""
print "One Chromosome, All the Difference"
print "In doesn't matter what game, what place, what time, what kind of internet connection. The simple truth is this: gaming in male-dominated. Close to 100% of any gaming community is male. Go to E3, and you find booth babes. No booth.. guys, but babes. You know as well as I that a female gamer is something rare to behold, and I can't help but wonder why that is."
print "First off, social gender roles. Man is hunter, woman gatherer. There are specific duties and behaviors that are deemed right and wrong for each gender, and unfortunately, gaming is under the 'male' category. Tools, cars, games, and more or less computers and technology, is a guy thing. Since the 70's this has changed quite a bit, but deep under all those media buzzwords are the same old-fashioned views of life. No one will admit it, but they still follow the ways of old. No one will admit it because it's sexist. Sure, you have the effeminate man and the tomboy, but when you get right down to it, it's the knight in shining armor and the damsel in distress."
print "Or maybe the answer is not so philosophical? The game developer industry is populated with males, and therefore the games will be oriented towards male. Maybe it has something to do with the females themselves. Do most of them see the joy of seeing limbs flying across the screen, or the last wave of assualt before your enemy is decimated, or the thrill of knowing you own? There are a couple games that have a substantial female following. RPGs, MMORPGs, SimCity, The Sims, etc. all have considerably strong female patrons. Quake III, Unreal Tourney, CS, and the like are very, very overpopulated with males. Can you see some kind of correlation? If there's any trend here (no hate mail please), the 'mindless' action games are geared toward males because it attends to one of our basic needs (to kill). The games that have a large female fanbase aren't really made for any specific gender, and even if they are, they are more involved (story and character-wise). Perhaps if Quake III had a beautifully written love story in it, would it attract more females to the game? If Counter-Strike was about a sensitive, new age, untrained counter-terrorist who was just trying to make sense of the world while still attempting to be a good single father, would it change anything?"
print "The bottom line is, we live in a country that embraces everything from everywhere, intolerance and tolerance. Therefore, there should no social punishments for a girl playing a game, or a guy taking up sewing. I sincerely doubt that any of that will happen, but I can dream. Yes, I dream of female gamers. Of actually using.. get this.. teamwork in Counter-Strike, of playing a legit game of Diablo II with someone I can get to know and converse with. Of intelligent, kind people who don't feel the need to use the f-word several times in every sentence. Granted, there are guys who do this, but nothing beats a lady."
print "(by: Trent)"
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="3":
print "These are the movie reviews...."
print "================================="
print "| 1)Matrix & The Cat in the Hat |"
print "================================="
print ""
print "Which of the reviews do you wish to see?"
choice=raw_input("Which? :")
if choice=="1":
print ""
print "Two of the most anticipated movie releases this November are The Matrix Revolutions (November 5) and Dr. Seuss' The Cat in the Hat (November 21). Revolutions, which is not yet rated, is the end of the Matrix trilogy. The interesting thing about the release of this film is how it's opening at the exact same time worldwide. In the Matrix Reloaded, Zion was about to fall. In Revolutions, biochemical machines terrorize the city and Neo (Keanu Reeves) must fulfill his destiny as the savior of humankind."
print "Dr. Seuss' Cat in the Hat, however has nothing to do with biochemical machines terrorizing cities, although the playful feline, played by comic genious Mike Myers, does make a mess of things when he visits two well-behaved children while their mother is out. But our pesky cat isn't alone in his mischievious deeds. He also has help from his pays Thing 1 and Thing 2, with their clothes of red and their hair of blue. That wasn't a very Seussical rhyme, but you get the drift. This is a great family film, rated PG."
print "(by: Alissa)"
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="4":
print "These are the book reviews...."
print "================================="
print " 1)Cyber Shock |"
print " 2)Deep in the Jungle of Doom |"
print " 3)Jonathan Park |"
print " 4)Rascal |"
print "================================="
print ""
print "Which one of these reviews do you wish to read?"
choice=raw_input("Which one? :")
if choice=="1":
print ""
print "In the book Cyber Shock, by David Lambert, a boy try’s to load some new data into his computer when it goes haywak. Jed, the boy, afterwards can log onto the Internet and look at his hard drive. Will this ability be used for good or bad? If the time comes to use it for good will it be used? I myself think this book could have been written better. For instance when I read it I kinda fell asleep towards the end. I give this a 7 out of ten."
print "(by: JBR)"
elif choice=="2":
print ""
print "Deep In The Jungle of Doom, by R.L. Stine, is a strange book that you feel you want to read on. You begin on a boring tour and then find yourself fighting a monster jumping into a lake, meeting swamp people, turning into one yourself, or more. Even greater you get to choose what you do in the book, plus it is about you. I give it an eight out of ten."
print "(by: JBR)"
elif choice=="3":
print ""
print "Jonathan Park & the Secret of the Hidden Cave, by my dad and step mom (Pat & Sandy Roy), is a good book for young readers. It is volume one and the only book currently. A second book is in the process which I believe is called The Sun Chaser. There is also a series on tapes that continue the story. For more info visit icr.org. In the book Jonathan and his father get trapped in a cave in a storm. Another family also gets stuck there and they find a fossil. Word spreads and Simon and his two dodo brained idiotic side kicks try to steal it. What will become of Jonathan and his friends? I guess you’ll have to read. I give this book a nine out of ten. I would give it a 9 ½ but only whole numbers."
print "(by: JBR)"
elif choice=="4":
print ""
print "I have recently read a book called Rascal, by Sterling North. It is a book that I think anyone with a heart would love. The story is about a boy who by accident finds a nest of raccoons and keeps one. He raises it with all his other animals including a cranky crow. They fish and go everywhere together, except school. Soon the raccoon eats neighbors’ vegetables, and is a problem. Sterling must decide to keep the raccoon Rascal in a cage, already hand built, or the wild. I can’t tell you the end, but what I can say is on a scale of 1-10 (10 biggest) I give this good book a ten."
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="5":
print "Here are your choices for short stories..."
print "================================="
print "| 1)Cold Fingers |"
print "| 2)Thirteenth Wish (exert) |"
print "================================="
print ""
print "Which short story do you want to read?"
choice=raw_input("Which? :")
if choice=="1":
print ""
print "It was Halloween night, and a golden moon hung over the dark branches of the neighborhood. People were trick-or-treating, having so much fun, 'I hate Halloween,' says a little girl, 'I hate it so much, all those kids laughing and having fun. I know, I’ll give them a trick, not a treat,' says the mischievous girl. She thought of something good for a trick and put it into action. She put webs and spiders every where. She put on a witch costume, and set a goblet in the doorway. She couldn’t wait until some trick-or-treaters to come. 'I guess I will have fun this Halloween,' said the girl."
print "Meanwhile, a block away two kids, best friends, approach the next house. Ding! Dong! Went the bell. 'Trick-or-treat!' yelled the boys so loud it almost knocked over the lady who just opened the door. 'Careful boys, you almost knocked me over!' said the lady. She gave them both two candies each. They left for the next house, but there were no lights on, which usually means no ones home. The same thing happened for the rest of the block; there were no lights on."
print "Then they heard a scream from the next house. They ran to it and stopped dead in their tracks. They couldn’t believe their eyes; the house looked like it hadn’t been cared for for years. It had spider webs left and right, and two windows were broken. As they stepped closer to it clouds, dark clouds, circled the house. Lightning hit a light pole and almost smashed them as it fell. 'Let’s go home, its getting dark,' said one of them, but the other wasn’t ready. 'Let’s just get this last house, why are you scared?' said the boy. They started toward the house still thinking about the pole and the lightning. Then out of no where a vicious dog appeared. Its eyes were red, and its teeth were stained with blood."
print "It started charging towards them with its bloody mouth open, staring at them like they were his favorite steaks cooked just right. They tried to move around him, but he was to fast. Then they heard another scream. It wasn’t a normal scream it was a being tortured scream. They were now more determined than ever to get to the house. While thinking about the scream they forgot about the dog, which was now thinking, 'How could they have forgotten that a vicious dog is standing right in front of them.' Then the kids remembered the dog was there. Then one of the boys had an idea,' I’ll distract him while you get in side, got it.' The other boy nodded and ran inside. When inside he realized he almost tripped over a goblet while walking into the house."
print "He heard a noise, kind of a tearing noise from outside where he had left his friend. Then all of a sudden something cold and slimy grabbed him from behind. Next thing he knew he was in a room, all alone. All of a sudden he heard a sound, and turned around to find his friend bleeding all over and a little girl who was crying, but that wasn’t the sound. The sound was poison gas leaking into the room through the pipe. He knew what was happening they were lured into a trap, which could only mean:"
print "THE END"
print "(by: JBR)"
elif choice=="2":
print ""
print "‘Run!’ He yelled as he ran through the jungle with the rain pelting down onto his back. As he ran trees left and right scraped him as he dodged each trunk. He knew it was on his tail as it came closer and closer. He then thought, ‘Why, why did I have to wish to come here!’ He slowed and stopped as he came to an enormous root in the tiny path. He turned and heard the crunching sound of dead leaves lying on the forest floor a few feet away, behind the bush. A sudden sound behind him, where the root was, made him jump. On the other side of the root was now his good friend Jasmine. As a tall, twelve-year-old, skinny figure she had been able to run faster than he had."
print "He was joyous to see her; the only thing he couldn’t comprehend was how she got on the other side of the root if they ran from the same place. Then slowly the surrounding bushes, scrubs, and trees of the jungle began to disappear. ‘Finally it’s over,’ they thought together, when a sudden movement was seen from the bushes. The leopard lunged from its hiding place. David, in a reaction with the leopard, jumped and pushed Jasmine out of the way. She got up and ran through two trees, which were now the front doors. By the time Mr. and Mrs. Lane had gotten home the leopard had disappeared with the jungle. All they saw was their first son’s clothes lying on the ground..."
print "(by: JBR)"
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="6":
print ""
print "JBR_Enterprises takes pride in our thinking abilities. So we have no pride. Anyway, we our good at coming up with phrases and mottos! That is why we only have 9. We actually have roughly 20 something, but we lost the paper…(We are sad, huh?)...Well look at these few, and if you see something you like…"
print ""
print "Keep on making faces at the security cameras, we love that...We really do."
print "We won't tell if you don't ask."
print "We don't want to say"
print "Stop looking at us"
print "We know where you live"
print "Remember only death can kill you"
print "If you think you are stupid, we know you are"
print "If we get around to finishing our work, it looks good"
print "You are lucky if you aren't part of us"
print "We got our ideas everywhere…Really"
enter=raw_input("Press the 'enter' button, on your key board, to continue back to the main options...")
elif subchoice=="7":
print ""
print " print " print " print " print " print " print " print " print " print " print " print " print " print " print " print " print " print " print " print "ww
 
Here is.. at least some of the script. If you skip to the bottom (the calculator part) you'll see:

choice=raw_input("Which Choice? : ")
if choice=="1":
print ""
choice=raw_input("How many numbers do you want to add together? 2, 3, 4, 5, 6? : ")
if choice=="2":
a=input("first number: ")
b=input("second number: ")
if a=="" or " " or " ":
print "Not an option"

x=a+b
print "The answer is",x
print ""
enter=raw_input("Press enter to go on back to the main options!")

This is where the problem lies. When asking input from the user on a or b, if nothing is entered, the program will crash with an EOF error. All attempts at while/if statements or functions have been able to catch this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top