Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored Sep 4, 2022
1 parent 8b9daaf commit 27d70a2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Exe_and_Ohs_kyu7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Checking if there are the same amount of exes and ohs in a string

def xo(s):
s = s.lower()
countx = 0
counto = 0
for element in s:
if element is "x":
countx += 1
for element in s:
if element is "o":
counto += 1
if countx == counto:
return True
else:
return False

0 comments on commit 27d70a2

Please sign in to comment.