Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@
"contributions": [
"doc"
]
},
{
"login": "anirudh-jwala",
"name": "Anirudh Jwala",
"avatar_url": "https://avatars0.githubusercontent.com/u/25549847?s=460&v=4",
"profile": "https://www.linkedin.com/in/anirudh-jwala-533859135/",
"contributions": [
"doc",
"code"
]
}
]
}
15 changes: 15 additions & 0 deletions Day1/Python3/Anirudh_Day1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'''
* @author: anirudh-jwala
* @date: 12/01/2019
'''
print("Enter the value of n: ")
n = int(input())
for i in range(1, n+1):
if i % 3 == 0 and i % 5 == 0:
print("Fizz Buzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
20 changes: 20 additions & 0 deletions Day2/Python/Anirudh_Day2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'''
* @author: anirudh-jwala
* @date: 12/01/2019
'''
def reverse(string):
return "".join(reversed(string))

print("Enter a string to be reversed: ")
string = input()
print(reverse(string))

print()

print("Palindrome Check")
palindrome = input()
checking_string = reverse(palindrome)
if palindrome == checking_string:
print("Given string is a palindrome")
else:
print("Not a palindrome")
19 changes: 19 additions & 0 deletions Day3/Python/Anirudh_Day3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
@author : anirudh-jwala
@date : 12/01/2019
"""
print("Enter two strings: ")
string1 = input()
string2 = input()

counter = 0

# First we shall be check whether or not they are of same length

if len(string1) == len(string2):
for i in range(len(string2)):
if string1[i] != string2[i]:
counter += 1
print("The Hamming Distance between two strings is", counter)
else:
print("We require strings of equal length")
22 changes: 22 additions & 0 deletions day4/Python/Anirudh_Day4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
@author : anirudh-jwala
@date : 12/01/2019
"""
# Finding no of vowels in given string

# a e i o u A E I O U are the vowels in English language

print("String to calculate vowels:")
string = input()
vowels=['a','e','i','o','u', 'A', 'E', 'I', 'O', 'U']
counter = 0

for i in range(len(string)):
if string[i] in vowels:
counter += 1

print("No of vowels are ", counter)

print()

print("Most frequently frequently character: ")
62 changes: 62 additions & 0 deletions day5/Python/Anirudh_Day5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""
@author : anirudh-jwala
@date : 12/01/2019
"""

# Pattern 1

'''
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
'''

print("Enter n value")
n = int(input())

def pattern1(n):
for i in range(1, n+1):
for j in range(1, i+1):
print(j, end=" ")
print()


# Pattern 2
'''
1
2 3
4 5 6
7 8 9 10
'''
def pattern2(n):
count = 0
for i in range(1, n+1):
for j in range(1, i+1):
count += 1
print(count, end=" ")
print()


# Pattern 3
'''
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
'''
def pattern3(n):
for i in range(1, n+1):
for j in range(1, i+1):
print(j, end=" ")
print()
for i in range(n, 1, -1):
for j in range(1, i):
print(j, end=" ")
print()