Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 4 coding #48

Merged
merged 15 commits into from
Dec 25, 2018
10 changes: 10 additions & 0 deletions Day2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,16 @@ if d==e:
else:
print("Not a pallindrome")
```
<<<<<<< HEAD
Shashankjain12 marked this conversation as resolved.
Show resolved Hide resolved
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

<<<<<<< HEAD
=======
=======

>>>>>>> 59b8bd388e0854765c3122d6e802a85978004667
=======

>>>>>>> 6aef1378d44840c82d996e7d0ad58664d70abeae
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove lines 667 to 674

## Ruby implementation

### [palindrome.rb](./Ruby/palindrome.rb)
Expand All @@ -680,3 +689,4 @@ end
```



11 changes: 11 additions & 0 deletions Day3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ else:
print("Hamming Distance = ", HD)
```
##Python Implementation
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line as well


### [Solution](./Python/Shashankham.py)
``` Python
Expand All @@ -290,6 +291,16 @@ else:
* @date: 24/12/2018
"""

=======
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all such lines


### [Solution](./Python/Shashankham.py)
``` Python
"""
* @author: Shashank Jain
* @date: 24/12/2018
"""

>>>>>>> 59b8bd388e0854765c3122d6e802a85978004667
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

a=input("Enter the first string?")
b=input("Enter the second string?")
c=list(a.replace(" ",""))
Expand Down
16 changes: 16 additions & 0 deletions day4/Python/Shashankchar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
* @author: Shashank Jain
* @date: 25/12/2018
"""
a=input("Enter the string to count frequent occuring characters?")
b=list(a.replace(" ","").lower())
c=[]
for i in b:
d=(i,b.count(i))
c.append(d)

e=dict(list(set(c)))
f=max(e)
g=max(e.values())
print("maximum occurence is of {0}:{1}".format(f,g))

14 changes: 14 additions & 0 deletions day4/Python/Shashankvowel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
* @author: Shashank Jain
* @date: 25/12/2018
"""
a=input("Enter the string to count no. of vowels?")
b=list(a.replace(" ","").lower())
c=['a','e','i','o','u']
count=0
for i in b:
for j in c:
if (j==i):
count=count+1
print(count)

39 changes: 37 additions & 2 deletions day4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,26 @@ for char in string:
# Print the result
print("Number of vowels in the string are : ",count)

```
##Python Implementation
##[Solution](./Python/Shashankvowels.py)
"""
* @author: Shashank Jain
* @date: 25/12/2018
"""
```Python
a=input("Enter the string to count no. of vowels?")
b=list(a.replace(" ","").lower())
c=['a','e','i','o','u']
count=0
for i in b:
for j in c:
if (j==i):
count=count+1
print(count)
```

<hr/>

</hr>
## Part B -- Max Chars Problem

**Question** - Given a string, write a program to return the character that appears most frequently in that string
Expand Down Expand Up @@ -342,5 +358,24 @@ print("The most occouring character in the string is : ", max(characters,key=cha

```

##Python Implementation
###[Solution] (./Python/Shashankchar.py)
"""
* @author: Shashank Jain
* @date: 25/12/2018
"""
``` Python
a=input("Enter the string to count frequent occuring characters?")
b=list(a.replace(" ","").lower())
c=[]
for i in b:
d=(i,b.count(i))
c.append(d)

e=dict(list(set(c)))
f=max(e)
g=max(e.values())
print("maximum occurence is of {0}:{1}".format(f,g))
```