Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions week1/assignments/bibhu_19/pal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

def isPalindrome(str):


for i in xrange(0, len(str)/2):
if str[i] != str[len(str)-i-1]:
return False
return True
s = "radardf"
ans = isPalindrome(s)

if (ans):
print("True")
else:
print("False")
2 changes: 2 additions & 0 deletions week1/assignments/bibhu_19/rev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
s="I am testing"
print(''.join(reversed(s)))
11 changes: 11 additions & 0 deletions week1/assignments/bibhu_19/sumandmul.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
a=[1,2,3,4]
b=sum(a)
print (b)
def multiplyList(myList) :

result = 1
for x in myList:
result = result * x
return result
print(multiplyList(a))

10 changes: 10 additions & 0 deletions week1/assignments/bibhu_19/vowel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
word= ''
word = word.lower()
if (len(word) > 0 and word.isalpha()):
if(word == 'a' or word == 'e' or word == 'i' or word == 'o' or word == 'u'):
print 'vowel'
else:
print 'Consonant'
else:
print 'empty'