Skip to content

Commit

Permalink
daily code (#30)
Browse files Browse the repository at this point in the history
* Add @Shashankjain12 as a contributor

* contribution commit

* Day1 and Day2
  • Loading branch information
Shashankjain12 authored and MadhavBahl committed Dec 21, 2018
1 parent c535fb5 commit 2dbc909
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 148 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Expand Up @@ -111,6 +111,16 @@
"doc",
"code"
]
},
{
"login": "Shashankjain12",
"name": "Shashank jain",
"avatar_url": "https://avatars1.githubusercontent.com/u/20285786?v=4",
"profile": "http://www.myshashank.tech",
"contributions": [
"doc",
"code"
]
}
]
}
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
@@ -1,5 +1,5 @@

[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors)
## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
Expand All @@ -8,7 +8,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
<!-- prettier-ignore -->
| [<img src="https://avatars2.githubusercontent.com/u/26179770?v=4" width="100px;"/><br /><sub><b>MADHAV BAHL</b></sub>](http://madhavbahl.tech/)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Code") [📝](#blog-MadhavBahlMD "Blogposts") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=MadhavBahlMD "Documentation") [🎨](#design-MadhavBahlMD "Design") [✅](#tutorial-MadhavBahlMD "Tutorials") | [<img src="https://avatars2.githubusercontent.com/u/32531173?v=4" width="100px;"/><br /><sub><b>Rajdeep Roy Chowdhury</b></sub>](http://www.linkedin.com/in/razdeeproychowdhury)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Code") [📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Razdeep "Documentation") [✅](#tutorial-Razdeep "Tutorials") | [<img src="https://avatars1.githubusercontent.com/u/16208722?v=4" width="100px;"/><br /><sub><b>Hrishi</b></sub>](https://hrishi1999.github.io)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Hrishi1999 "Code") | [<img src="https://avatars1.githubusercontent.com/u/33101287?v=4" width="100px;"/><br /><sub><b>Bhanu Ailani</b></sub>](https://github.com/Bhanu0202)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Bhanu0202 "Code") | [<img src="https://avatars3.githubusercontent.com/u/35690440?v=4" width="100px;"/><br /><sub><b>Deepak Sharma</b></sub>](https://sourcerer.io/dsdsharma)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dsdsharma "Code") | [<img src="https://avatars2.githubusercontent.com/u/28749866?v=4" width="100px;"/><br /><sub><b>Ramanpreet Singh</b></sub>](https://github.com/Ramanpreet6262)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Ramanpreet6262 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Ramanpreet6262 "Code") | [<img src="https://avatars1.githubusercontent.com/u/27620628?v=4" width="100px;"/><br /><sub><b>Anil Khatri</b></sub>](https://imkaka.github.io/)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=imkaka "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars0.githubusercontent.com/u/39827514?v=4" width="100px;"/><br /><sub><b>Ashwek Swamy</b></sub>](https://github.com/ashwek)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=ashwek "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=ashwek "Code") | [<img src="https://avatars1.githubusercontent.com/u/32368107?v=4" width="100px;"/><br /><sub><b>Dhruv Gupta</b></sub>](https://github.com/dhruv-gupta14)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dhruv-gupta14 "Code") | [<img src="https://avatars0.githubusercontent.com/u/30969577?v=4" width="100px;"/><br /><sub><b>Aadit Kamat</b></sub>](https://sg.linkedin.com/in/aadit-kamat-12a5a8140)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=aaditkamat "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=aaditkamat "Code") |
| [<img src="https://avatars0.githubusercontent.com/u/39827514?v=4" width="100px;"/><br /><sub><b>Ashwek Swamy</b></sub>](https://github.com/ashwek)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=ashwek "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=ashwek "Code") | [<img src="https://avatars1.githubusercontent.com/u/32368107?v=4" width="100px;"/><br /><sub><b>Dhruv Gupta</b></sub>](https://github.com/dhruv-gupta14)<br />[💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=dhruv-gupta14 "Code") | [<img src="https://avatars0.githubusercontent.com/u/30969577?v=4" width="100px;"/><br /><sub><b>Aadit Kamat</b></sub>](https://sg.linkedin.com/in/aadit-kamat-12a5a8140)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=aaditkamat "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=aaditkamat "Code") | [<img src="https://avatars1.githubusercontent.com/u/20285786?v=4" width="100px;"/><br /><sub><b>Shashank jain</b></sub>](http://www.myshashank.tech)<br />[📖](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Shashankjain12 "Documentation") [💻](https://github.com/MadhavBahlMD/DailyCodeBase/commits?author=Shashankjain12 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
32 changes: 32 additions & 0 deletions Day1/C++/ShashankFizz.cpp
@@ -0,0 +1,32 @@
/**
* @author: Shashankjain12
* @date: 21/12/2018
**/
#include<iostream>
using namespace std;
int main()
{
int i,n;
cout<<"FIZZ BUZZ \n";
cout<<"Enter the input for the game";
cin>>n;
for(i=1;i<=n;i++)
{
if((i%3==0)&&(i%5==0))
{
cout<<"fizzbuzz,";
}
else if((i%5)==0)
{
cout<<"buzz,";
}

else if((i%3)==0)
{
cout<<"fizz,";
}
else
cout<<i<<",";
}
return 0;
}
16 changes: 16 additions & 0 deletions Day1/Python3/ShashankFizz.py
@@ -0,0 +1,16 @@
'''
* @author: Shashankjain12
* @date: 21/12/18
'''
print("Fizz Buzz")
n=int(input("Enter the number?"));
for i in range(1,n+1):
if((i%3)==0 and (i%5)==0):
print("Fizzbuzz ")
elif((i%3)==0):
print("fizz ")
elif ((i%5)==0):
print("buzz ")
else:
print(i)

22 changes: 21 additions & 1 deletion Day1/README.md
Expand Up @@ -338,4 +338,24 @@ def solution(n)
p get_result(num + 1)
end
end
```
```
## Python Implementation

## ShashankFizz.py (./python/ShashankFizz.py)
``` python
"""
* @author: Shashankjain12
* @date: 21/12/18
"""
print("Fizz Buzz")
n=int(input("Enter the number?"));
for i in range(1,n+1):
if((i%3)==0 and (i%5)==0):
print("Fizzbuzz ")
elif((i%3)==0):
print("fizz ")
elif ((i%5)==0):
print("buzz ")
else:
print(i)
```
15 changes: 15 additions & 0 deletions Day2/Python/String_and_pallindrome.py
@@ -0,0 +1,15 @@
"""
* @author Shashank
* @date 21/12/2018
"""

a=input("Enter the input string:")
d=a.replace(" ","")
c=list(d)
c.reverse()
e="".join(c)
if d==e:
print("String is pallindrome")
else:
print("Not a pallindrome")

21 changes: 20 additions & 1 deletion Day2/README.md
Expand Up @@ -528,4 +528,23 @@ void main(){
printf("palindrome\n");
}

```
```
##Python implementation
##String reversing and pallindrome checking(./python3/String_and_pallindrome.py)
``` Python
"""
* @author Shashank
* @date 21/12/2018
"""
a=input("Enter the input string:")
d=a.replace(" ","")
c=list(d)
c.reverse()
e="".join(c)
if d==e:
print("String is pallindrome")
else:
print("Not a pallindrome")
```

0 comments on commit 2dbc909

Please sign in to comment.