Python programming

  • Posted on: 11 October 2016
  • By: admin
Block: 
Term: 
Year: 
LA Code: 
Code: 
Room: 
Levels: 
3
4

Beginners python programming.

Join class to get assignment here: https://repl.it/classroom/invite/BRdNNFx

Learn the basics of programming using this user friendly language that will run on any machine (even an ipad). You will need some sort device to program on.

I can cater the course to match you ability.

Potential avenues of projects we could create: chat bots, text based adventure games, password crackers, network scaners


import random
ans = raw_input('scissors, paper, rock, lizard or spock?').title()
print random.choice([s for s in ['Scissors cuts Paper','Paper covers Rock','Rock crushes Lizard','Lizard poisons Spock','Spock smashes Scissors','Scissors decapitates Lizard','Lizard eats Paper','Paper disproves Spock','Spock vaporizes Rock','Rock crushes Scissors'] if ans in s]+['Draw!']if ans in ['Scissors','Paper','Rock','Lizard','Spock'] else ['Incorrect input.'])