Politics - if X=="D" kk=27 if X!="D" kk=0...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
print"Electoral College Count"+ "\nEnter your predictions!" S=raw_input("\nNevada (D or R):") if S=="D": aa=5 if S!="D": aa=0 if S=="R": bb=5 if S!="R": bb=0 T=raw_input("\nColorado (D or R):") if T=="D": cc=9 if T!="D": cc=0 if T=="R": dd=9 if T!="R": dd=0 U=raw_input("\nNew Mexico (D or R):") if U=="D": ee=5 if U!="D": ee=0 if U=="R": ff=5 if U!="R": ff=0 V=raw_input("\nOhio (D or R):") if V=="D": gg=20 if V!="D": gg=0 if V=="R": hh=20 if V!="R": hh=0 W=raw_input("\nVirginia (D or R):") if W=="D": ii=13 if W!="D": ii=0 if W=="R": jj=13 if W!="R": jj=0 X=raw_input("\nFlorida (D or R):")
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if X=="D": kk=27 if X!="D": kk=0 if X=="R": ll=27 if X!="R": ll=0 D=4 R=4 Y=raw_input("\nNew Hampshire (D or R):") if Y=="D": mm=4 if Y!="D": mm=0 if Y=="R": nn=4 if Y!="R": nn=0 Obama=255+aa+cc+ee+gg+ii+kk+mm McCain=200+bb+dd+ff+hh+jj+ll+nn print"\nIf your predictions are correct, the electoral college counts will be:" print "Obama", Obama print "McCain", McCain if McCain > Obama: print"\n\nMcCain Wins!" if Obama > McCain: print"\n\nObama Wins!"...
View Full Document

This note was uploaded on 02/21/2010 for the course ECS 40175 taught by Professor Amenta during the Fall '09 term at UC Davis.

Page1 / 2

Politics - if X=="D" kk=27 if X!="D" kk=0...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online