TODO: 100 days of code on python language....
Day001 - Hello Greeting
- Output:-
Hello, Harry!
Day002 - Sum of three numbers
- Output:-
i/p
2
3
4
o/p
9 // Sum of Numbers
Day003 - Area of right triangle
- ![](http://i.imgur.com/6EkzVxA.jpg)
- Output:-
i/p
3 // b
5 // h
o/p
7.5 // area
Day004 - Blockly Maze Completion Level 10
- Play BlocklyGame upto level 10
- Paste the JS in ####level_10_code####
Day005 - Maze Completion Using Right Wall
- Play BlocklyGame upto level 10
- Paste the JS in ####level_10_code####
- Based on left wall....
Day006 - Maze Completion Using Left Wall
- Play BlocklyGame upto level 10
- Paste the JS in ####level_10_code####
- Based on right wall....
- Output:-
i/p
179
o/p
The next number for the number 179 is 180
The previous number for the number 179 is 178
Day008 - Apple Sharing
- Output:-
i/p
6 // No of Students
50 // No of Apples
o/p
8 // apples for each
2 // apples left
Day009 - Hours and minutes
- Output:-
i/p
3900 // seconds
o/p
1 65 // hours minutes
Day010 - Distance between two points
- Output:-
i/p
0
0
4
3
o/p
5
Day011 - Sum of digits
- Output:-
i/p
123
o/p
6
Day012 - Odd or Even
- Output:-
i/p
5
o/p
odd
i/p
8
o/p
even
Day013 - Days in Month
- Output:-
i/p
1 // jan
o/p
31 // days
Day014 - Minimum of Three
- Output:-
i/p
5
3
7
o/p
3
Day015 - Leap Year
- Output:-
i/p
2012
o/p
LEAP
Day016 - Jugs for Three
- Output:-
i/p
33
o/p
Jugs
i/p
112
o/p
112
Day017 - Mugs for Five
- Output:-
i/p
3
o/p
Jugs
i/p
15
o/p
JugsMugs
Day018 - Membership: Digit in Number
- Output:-
i/p
4
234
o/p
True
Day019 - JugsMugsPugs
- Output:-
i/p
105
o/p
JugsMugsPugs
- Description:-
JugsMugsPugs
Write a program that receives a number on the input.
If the number is a multiple of 3, it prints "Jugs".
If the number is a multiple of 5, it prints "Mugs".
If the number is a multiple of 7, it prints "Pugs".
If the number is a multiple of both 3 and 5, it prints "JugsMugs".
If the number is a multiple of both 3 and 7, it prints "JugsPugs".
If the number is a multiple of both 5 and 7, it prints "MugsPugs".
If the number is a multiple of both 3, 5 and 7, it prints "JugsMugsPugs".
Otherwise, it prints the number.
Day020 - JugsMugsPugs Lite
- Output:-
i/p
105
o/p
JugsMugsPugs
- Description:-
JugsMugsPugs LITE
Write a program that receives a number on the input.
- If the number is a multiple of 3, it prints "Jugs".
- If the number is a multiple of 5, it prints "Mugs".
- If the number is a multiple of 7, it prints "Pugs".
- If the number is a multiple of both 3 and 5, it prints "JugsMugs".
- If the number is a multiple of both 3 and 7, it prints "JugsPugs".
- If the number is a multiple of both 5 and 7, it prints "MugsPugs".
- If the number is a multiple of both 3, 5 and 7, it prints "JugsMugsPugs".
Otherwise, it prints the number.
LITE REQUIREMENT:
Limit your code to use only if statements and not to exceed 4 of them.
You are a real winner if you can achieve it using not more than 3 if statements.
GO FOR IT!
-----
While you are it, try and see if you can use only one print statement.
Day021 - JugsMugsPugsPlus
- Output:-
i/p 51 o/p JugsMugs
- Description:-
JugsMugsPugs Plus Write a program that receives a number on the input. - If the number is a multiple of 3, or it contains digit 3, it prints "Jugs". - If the number is a multiple of 5, or it contains digit 5, it prints "Mugs". - If the number is a multiple of 7, or it contains digit 7, it prints "Pugs". Otherwise, it prints the number. SPECIAL REQUIREMENT: Try and limit the number of conditional statements to not more than 4. And use only one print statement.
Day022 - JugsMugsPugsPlus Reverse
- Output:-
i/p 73 True # contains 7 and 3, print reverse order o/p PugsJugs
- Description:-
JugsMugsPugsPlus and Reverse Write a program that receives a number on the input. It also should receive another value 'rev' (either 0 or 1) on the input. - If the number is a multiple of 3, or it contains digit 3, it prints "Jugs". - If the number is a multiple of 5, or it contains digit 5, it prints "Mugs". - If the number is a multiple of 7, or it contains digit 7, it prints "Pugs". - If the number is a multiple of both 3 and 5, it prints "JugsMugs". - also if number contains 3 and 5, it prints "JugsMugs" - If the number is a multiple of both 3 and 7, it prints "JugsPugs". - also if number contains 3 and 7, it prints "JugsPugs" - If the number is a multiple of 3, 5 and 7, it prints "JugsMugPugs". - also if number contains 3, 5 and 7, it prints "JugsMugsPugs" Otherwise, it prints the number. REVERSE REQUIREMENT: If the boolean 'rev' is True (or 1), then reverse the order of printing. - "PugsJugsMugs" for multiples of 3, 5 and 7 - "PugsMugs" for multiple of 5 and 7 - "MugsJugs" for multiple of 3 and 5 - "PugsJugs" for multiple of 3 and 7
Day023 - JugsMugsPugs Range
- Output:-
i/p 15 1 o/p 1 2 Jugs 4 Mugs Jugs Pugs 8 Jugs Mugs 11 Jugs Jugs Pugs MugsJugs
- Description:-
INTERVIEW GRADE This is a frequently asked problem in technical interviews. It is also asked of senior software developers to gauge their ability to think and write clean code. JugsMugsPugsPlusReverse Range - Write a program that receives a number on the input and prints values from 1 to that number subjected to the conditions below. - It also should receive another value 'rev' (0 or 1) on the input. For every number in the given range, - If the number is a multiple of 3, or it contains digit 3, it prints "Jugs". - If the number is a multiple of 5, or it contains digit 5, it prints "Mugs". - If the number is a multiple of 7, or it contains digit 7, it prints "Pugs". - If the number is a multiple of both 3 and 5, it prints "JugsMugs". - also if number contains 3 and 5, it prints "JugsMugs" - If the number is a multiple of both 3 and 7, it prints "JugsPugs". - also if number contains 3 and 7, it prints "JugsPugs" - If the number is a multiple of 3, 5 and 7, it prints "JugsMugsPugs". - also if number contains 3, 5 and 7, it prints "JugsMugsPugs" Otherwise, it prints the number. REVERSE REQUIREMENT: If the boolean 'rev' is True (or 1), then reverse the order of printing. - "PugsJugsMugs" for multiples of 3, 5 and 7 - "PugsMugs" for multiple of 3 and 7 - "MugsJugs" for multiple of 3 and 5 - "PugsJugs" for multiple of 5 and 7