Giter Site home page Giter Site logo

100dayofcodepython's Introduction

100DayOfCodePython

TODO: 100 days of code on python language....

  • Output:-
Hello, Harry!
  • Output:-
i/p
2
3
4
o/p
9 // Sum of Numbers
- ![](http://i.imgur.com/6EkzVxA.jpg)
- Output:-
i/p
3 // b
5 // h
o/p
7.5 // area
  • Play BlocklyGame upto level 10
  • Paste the JS in ####level_10_code####
  • Play BlocklyGame upto level 10
  • Paste the JS in ####level_10_code####
  • Based on 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
  • Output:-
i/p
3900 // seconds
o/p
1 65 // hours minutes
  • 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
  • Output:-
i/p
5
3
7
o/p
3

Day015 - Leap Year

  • Output:-
i/p
2012
o/p
LEAP
  • 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
  • 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.
  • 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. 
  • 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.
    
  • 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
    
  • 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
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.