Jamiemcg

Yahoo! Answers - Python Variables and Conditional Statements

Sep 12th, 2014
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #Yahoo! Answers Question Response
  2. #Question URL: https://answers.yahoo.com/question/index?qid=20140912201048AAL2DEM
  3. #Code written by: Jamie
  4. #http://TechnicalCafe.com
  5.  
  6.  
  7. #assume variable "numberOfSides" has already been declared and initialized
  8.  
  9. #Use a conditional statement to assign the value of "true" to the variable
  10. #"isQuadrilateral" if "numberOfSides" is equal to 4 and "false" if "numberOfSides"
  11.  
  12.  
  13. if numberOfSides == 4:
  14.     isQuadrilateral = true;
  15. else:
  16.     isQuadrilateral = false;
Add Comment
Please, Sign In to add comment