Giter Club home page Giter Club logo

divisibility---visibility-of-numbers-'s Introduction

divisibility---visibility-of-numbers-

#---------------------------------------------------------------------------------------------------------------------------------------

MADE BY VIDIT VARSHNEY PASSION TO PROGRAM

QUES:- A program to find the numbers which are divisible by 3 and 7 but are not divisible by 5 and one more thing the output must be separated by comma (" ," )

#----------------------------------------------------------------------------------------------------------------------------------------

HINTS:-

Consider use range(#begin, #end) method

#-----------------------------------------------------------------------------------------------------------------------------------------

LOGIC

now look at the question what it says :------- a number which is divisible by 3 , 7 but not by 5 so it basically tells us to check the number by using conditions and we know that for this we use if loop

#-----------------------------------------------------------------------------------------------------------------------------------------

DESCRIPTION

 WHAT WE WANT FROM THE QUESTION :------------

i am writting this program by using list

after that i will update the list with the numbers but wait questions doesn't end . question wants output only separated by "commas" BUT BY THE ABOVE METHOD WE FIND OUTPUT IN THIS MANNER LIKE [ '2002', '2004'......] note:- the values like 2002,2004 are taken randomly BUT WE WANT IN THIS FORM 2002,2004,2006,........ SO FOR THIS WE HAVE TO USE A LITLE CHANGE WHILE UPDATING A LIST WE MAKE ALL NUMBERS AS STRING FORMAT , THEN WHILE PRINTING THE LIST WEWE USE .join()

#----------------------------------------------------------------------------------------------------------------------------------------

.join()

[ The join() method provides a flexible way to concatenate string. It concatenates each element of an iterable (such as list, string and tuple) to the string and returns the concatenated string.]

#----------------------------------------------------------------------------------------------

SO IN THIS WAY OF APPROACH WE GET THE DESIRED OUTPUT

#---------------------------------------------------------------------------------------------

IF REALLY HELPS YOU CLICK THAT STAR BUTTON ON THE ABOVE RIGHT SIDE

divisibility---visibility-of-numbers-'s People

Contributors

viditvarshney avatar

Watchers

 avatar  avatar

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.