# working with strings
brain="always look on the bright side of life"
print brain
Sunday="i spent my Sunday very well at my church"
print Sunday
uncle="Johnson"
aunty="hawa"
brother="henneh"
print aunty
quote="our trainer\'s health has been restored!"
print quote
rose="i\'m sad that sau\'s school is close"
print rose
print "python"[4]
print "yarkpawolobuluka"[10]
#working with string methods
par not="Norwegian Blue"
print Len(par not)
small_letter=par not.lower()
print small_letter
big_letter=small_letter.upper()
print big_letter
pi=3.4
total=str(pi)
print total
# working with advance print
breakfast="spam" + " and " + "egg"
print breakfast
uncle="Johnson"
print "my father brother is" + uncle
No comments:
Post a Comment