Skip to content

Instantly share code, notes, and snippets.

@danieldiekmeier
Last active December 19, 2015 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieldiekmeier/6014004 to your computer and use it in GitHub Desktop.
Save danieldiekmeier/6014004 to your computer and use it in GitHub Desktop.
Die Aufgaben aus der Python Bee aus M28_040
'''
Die Aufgaben aus der Python Bee aus M28_040
Daniel: Eine Funktion, die prüft, ob ein String ein Palindrom ist (Nicht richtig gelöst)
Max: Eine Funktion, die prüft, ob jeder erste Buchstabe eines Wortes in einem String großgeschrieben ist (Nicht richtig gelöst)
'''
def palindrom(s):
l = len(s) / 2
for x in xrange(l):
if s[x] == s[-x]:
pass
else:
p = False
break
if not p:
return False
else:
return True
def up(s):
up = True
l = s.split(' ')
for w in l:
if w[0] != w[0].uppercase():
return False
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment