Skip to content

Commit

Permalink
restructured
Browse files Browse the repository at this point in the history
  • Loading branch information
accakks committed Oct 3, 2018
1 parent c356835 commit f6e2483
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 16 deletions.
7 changes: 0 additions & 7 deletions Character Counter/README.md

This file was deleted.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
Simple Programs in Python

# Character Counter

- Counts number of times each character occurs in input string.
- Space is also taken as character
- For example, you enter "sass" => s: 3, a: 1
- Read about pprint [here](https://docs.python.org/3/library/pprint.html)


50 changes: 50 additions & 0 deletions RockPaperScissors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/python3

from random import randint

def rps():
playerCh = input('Choose rock, paper or scissors')
print('You chose '+playerCh)

computerCh = randint(1,3)

if computerCh == 1:
computerCh = 'rock'
print('Computer chose '+ computerCh )
elif computerCh == 2:
computerCh = 'paper'
print('Computer chose '+ computerCh )
else:
computerCh = 'scissors'
print('Computer chose '+ computerCh )
return(computerCh, playerCh)

c, p = rps()

if c == p:
print('Tie')
elif c == 'rock' and p == 'paper':
print('Player Wins')
elif c == 'rock' and p == 'scissors':
print('Computer Wins')
elif c == 'paper' and p == 'rock':
print('Computer Wins')
elif c == 'paper' and p == 'scissors':
print('Player Wins')
elif c == 'scissors' and p == 'rock':
print('Player Wins')
elif c == 'scissors' and p == 'paper':
print('Computer Wins')













File renamed without changes.
9 changes: 0 additions & 9 deletions TicTacToe/README.md

This file was deleted.

File renamed without changes.

0 comments on commit f6e2483

Please sign in to comment.