awesome-python-projects icon indicating copy to clipboard operation
awesome-python-projects copied to clipboard

Binary search in python

Open garimasingh128 opened this issue 5 years ago β€’ 31 comments

Binary Search Algorithm Create a random list of numbers between 0 and 100 with a difference of 2 between each number. Ask the user for a number between 0 and 100 to check whether their number is in the list. The programme should work like this. The programme will half the list of numbers and see whether the users number matches the middle element in the list. If they do not match, the programme will check which half the number lies in, and eliminate the other half. The search then continues on the remaining half, again checking whether the middle element in that half is equal to the user’s number. This process keeps on going until the programme finds the users number, or until the size of the subarray is 0, which means the users number isn't in the list.

garimasingh128 avatar Jul 25 '20 12:07 garimasingh128

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.73. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jul 25 '20 12:07 issue-label-bot[bot]

I am ready to work on this.

JoshikaNetha avatar Jul 30 '20 07:07 JoshikaNetha

@JoshikaNetha progress?

garimasingh128 avatar Aug 04 '20 20:08 garimasingh128

On progress maam I have some doubt where can I interact with you?

On Wed, 5 Aug, 2020, 2:14 AM Garima Singh, [email protected] wrote:

@JoshikaNetha https://github.com/JoshikaNetha progress?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-668815925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXJIBGRF6QH72OBOGNLR7BXMFANCNFSM4PHNUKXQ .

JoshikaNetha avatar Aug 05 '20 06:08 JoshikaNetha

Discord channel. In the group itself!

garimasingh128 avatar Aug 05 '20 06:08 garimasingh128

I am ready to solve this issue...if possible assign this issue thank you

pranesh-badarinath avatar Sep 01 '20 15:09 pranesh-badarinath

@JoshikaNetha You have any progress or should I unassign you?

garimasingh128 avatar Sep 01 '20 15:09 garimasingh128

Also, if you take up an issue and don't report within a week, then you will lose points as you are basically curbing others from taking up that issue.

garimasingh128 avatar Sep 01 '20 15:09 garimasingh128

@garimasingh128 sure (:

pranesh-badarinath avatar Sep 01 '20 15:09 pranesh-badarinath

Maam I'm just a beginner for python. I can solve the problem I am getting that GitHub I'm not much familiar with github.

On Tue, 1 Sep, 2020, 9:04 PM pranesh-badarinath, [email protected] wrote:

@garimasingh128 https://github.com/garimasingh128 sure (:

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-684942522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXJONWRA6AIZELQK6JTSDUH7TANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 02 '20 03:09 JoshikaNetha

What issues are you facing with GitHub? Can you send a screenshot or any query that you may have?

garimasingh128 avatar Sep 02 '20 05:09 garimasingh128

I don't pr and how to raise pr . I just know binary tree process I can write in code too.

On Wed, 2 Sep, 2020, 11:02 AM Garima Singh, [email protected] wrote:

What issues are you facing with GitHub? Can you send a screenshot or any query that you may have?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-685310059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXPDAA4WLDCA2QOIYEDSDXKFTANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 02 '20 07:09 JoshikaNetha

You can check out these videos: https://www.youtube.com/watch?v=G1I3HF4YWEw https://developers.redhat.com/articles/command-line-heroes-game-pull-request

One simple thing I would suggest is:

  • Fork the main repo
  • Clone it from your forked repo
  • Just add your code there
  • Do git add .
  • Do git commit -m "messsage"
  • Go to your forked repo on github and click on Submit a PR

Let me know once you do these and I will tell you further!

garimasingh128 avatar Sep 02 '20 08:09 garimasingh128

ok

On Wed, Sep 2, 2020 at 1:32 PM Garima Singh [email protected] wrote:

You can check out these videos: https://www.youtube.com/watch?v=G1I3HF4YWEw

https://developers.redhat.com/articles/command-line-heroes-game-pull-request

One simple thing I would suggest is:

  • Fork the main repo
  • Clone it from your forked repo
  • Just add your code there
  • Do git add .
  • Do git commit -m "messsage"
  • Go to your forked repo on github and click on Submit a PR

Let me know once you do these and I will tell you further!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-685427255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXL55N6KQEAJYXPEWNLSDX32NANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 02 '20 08:09 JoshikaNetha

Maam, I have done with videos done with coding part and I have downloaded nodejs also.

On Wed, 2 Sep, 2020, 1:41 PM Joshika Netha Namani, < [email protected]> wrote:

ok

On Wed, Sep 2, 2020 at 1:32 PM Garima Singh [email protected] wrote:

You can check out these videos: https://www.youtube.com/watch?v=G1I3HF4YWEw

https://developers.redhat.com/articles/command-line-heroes-game-pull-request

One simple thing I would suggest is:

  • Fork the main repo
  • Clone it from your forked repo
  • Just add your code there
  • Do git add .
  • Do git commit -m "messsage"
  • Go to your forked repo on github and click on Submit a PR

Let me know once you do these and I will tell you further!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-685427255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXL55N6KQEAJYXPEWNLSDX32NANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 06:09 JoshikaNetha

@JoshikaNetha So you can now create a PR for this issue?

garimasingh128 avatar Sep 05 '20 09:09 garimasingh128

I have forked the awesome-python-projects. But while cloning it showing permission denied.

On Sat, Sep 5, 2020 at 2:50 PM Garima Singh [email protected] wrote:

@JoshikaNetha https://github.com/JoshikaNetha So you can now create a PR for this issue?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687577382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXP6FNM65XJYQ5QHCKDSEH7EHANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 14:09 JoshikaNetha

You should use your own forked repo's URL while cloning it and then work on it.

garimasingh128 avatar Sep 05 '20 14:09 garimasingh128

From my repository only I'm taking url of awesome python projects . Still it's showing like could not create work tree for 'awesome python projects ' permission denied.

On Sat, 5 Sep, 2020, 8:08 PM Garima Singh, [email protected] wrote:

You should use your own forked repo's URL while cloning it and then work on it.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687619957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXIJVO3RK2OAXUEIAQTSEJEMVANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 14:09 JoshikaNetha

You may get this error if your folder contains previous files. So before git clone command try to remove all the files from that folder. You can use the below-given command.

$ rm -rf * $ git clone URL

Or you can try this

garimasingh128 avatar Sep 05 '20 14:09 garimasingh128

To clone do i need to use new folder>

On Sat, Sep 5, 2020 at 8:19 PM Garima Singh [email protected] wrote:

You may get this error if your folder contains previous files. So before git clone command try to remove all the files from that folder. You can use the below-given command.

$ rm -rf * $ git clone URL

Or you can try this https://stackoverflow.com/questions/16376035/fatal-could-not-create-work-tree-dir-kivy/16384466#:~:text=Open%20the%20file%20location%2C%20right,select%20%22Run%20as%20Administrator%22.&text=Then%2C%20just%20press%20%22Run%20as%20Administrator%22.&text=The%20directory%20in%20which%20you,why%20this%20problem%20is%20occurring.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687621198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXKKM36HHLSJ3N5S4WLSEJFXJANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 14:09 JoshikaNetha

$ git clone [email protected]:JoshikaNetha/awesome-python-projects.git Cloning into 'awesome-python-projects'... [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists Its showing like this

On Sat, Sep 5, 2020 at 8:20 PM Joshika Netha Namani < [email protected]> wrote:

To clone do i need to use new folder>

On Sat, Sep 5, 2020 at 8:19 PM Garima Singh [email protected] wrote:

You may get this error if your folder contains previous files. So before git clone command try to remove all the files from that folder. You can use the below-given command.

$ rm -rf * $ git clone URL

Or you can try this https://stackoverflow.com/questions/16376035/fatal-could-not-create-work-tree-dir-kivy/16384466#:~:text=Open%20the%20file%20location%2C%20right,select%20%22Run%20as%20Administrator%22.&text=Then%2C%20just%20press%20%22Run%20as%20Administrator%22.&text=The%20directory%20in%20which%20you,why%20this%20problem%20is%20occurring.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687621198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXKKM36HHLSJ3N5S4WLSEJFXJANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 14:09 JoshikaNetha

Run this:

git clone https://github.com/JoshikaNetha/awesome-python-projects.git

garimasingh128 avatar Sep 05 '20 14:09 garimasingh128

Done

On Sat, Sep 5, 2020 at 8:25 PM Garima Singh [email protected] wrote:

Run this:

git clone https://github.com/JoshikaNetha/awesome-python-projects.git

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

JoshikaNetha avatar Sep 05 '20 15:09 JoshikaNetha

Maam, I have to create any folder in awesome-python-projects which is present in my local system.

On Sat, Sep 5, 2020 at 8:32 PM Joshika Netha Namani [email protected] wrote:

Done

On Sat, Sep 5, 2020 at 8:25 PM Garima Singh [email protected] wrote:

Run this:

git clone https://github.com/JoshikaNetha/awesome-python-projects.git

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

JoshikaNetha avatar Sep 05 '20 15:09 JoshikaNetha

Follow the instructions. See how other projects are created. Name your folder and add the code and screenshots in it. Then add resources to readme just like how other projects have added theirs. Do this and tell me I'll guide u on how to add a PR to my repo.

garimasingh128 avatar Sep 05 '20 15:09 garimasingh128

Maam, I have to create an empty repository and there I have to create a readme file?

On Sat, Sep 5, 2020 at 8:52 PM Garima Singh [email protected] wrote:

Follow the instructions. See how other projects are created. Name your folder and add the code and screenshots in it. Then add resources to readme just like how other projects have added theirs. Do this and tell me I'll guide u on how to add a PR to my repo.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687625055, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXJXW2KUH6GC2YIGSZTSEJJSHANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 05 '20 15:09 JoshikaNetha

You have to create a folder inside the cloned repo by the name BINARY_SEARCH and add your code and screenshots of output inside it. Then, you have to change the README that is already present in the repo. You don't need to create one yourself. Just add the resources in the existing README.

garimasingh128 avatar Sep 05 '20 19:09 garimasingh128

Maam,I have added resources in my local system. What is the next process maam.

On Sun, Sep 6, 2020 at 1:26 AM Garima Singh [email protected] wrote:

You have to create a folder inside the cloned repo by the name BINARY_SEARCH and add your code and screenshots of output inside it. Then, you have to change the README that is already present in the repo. You don't need to create one yourself. Just add the resources in the existing README.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687655747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXJ7Z7XB2KXCZSB56CDSEKJYTANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 06 '20 05:09 JoshikaNetha

  • Go to your project folder and inside it open Git terminal
  • Type the following cmds
git add .
git commit -m "message"
  • Push your changes by:
git push origin master
  • Now go to your forked repo's URL: https://github.com/JoshikaNetha/awesome-python-projects.git
  • Here you will see create pull request option
  • Click on it and fill up the description and pull request title
  • Double-check by going here and you must be seeing your PR here.

garimasingh128 avatar Sep 06 '20 06:09 garimasingh128

In add command it's asking for path address. I have to add only my folder or else whole folder.

On Sun, 6 Sep, 2020, 11:33 AM Garima Singh, [email protected] wrote:

  • Go to your project folder and inside it open Git terminal
  • Type the following cmds

git add . git commit -m "message"

  • Push your changes by:

git push origin master

  • Now go to your forked repo's URL: https://github.com/JoshikaNetha/awesome-python-projects.git
  • Here you will see create pull request option
  • Click on it and fill up the description and pull request title
  • Double-check by going here https://github.com/garimasingh128/awesome-python-projects/pulls and you must be seeing your PR here.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/garimasingh128/awesome-python-projects/issues/5#issuecomment-687706868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVNNXOCA3NLWBPFQ75EYPLSEMQZZANCNFSM4PHNUKXQ .

JoshikaNetha avatar Sep 06 '20 06:09 JoshikaNetha