i want to loop this program from the start again when the input is yes in python The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceExtracting extension from filename in PythonHow do I remove an element from a list by index in Python?Emulate a do-while loop in Python?How do I trim whitespace from a Python string?Python progression path - From apprentice to guruWhy is reading lines from stdin much slower in C++ than Python?How to remove a key from a Python dictionary?Get unique values from a list in pythonPython: How can I store multiple user inputs when using for loop?

First use of “packing” as in carrying a gun

I could not break this equation. Please help me

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

Did God make two great lights or did He make the great light two?

Do working physicists consider Newtonian mechanics to be "falsified"?

How to delete random line from file using Unix command?

What force causes entropy to increase?

Wall plug outlet change

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

What's the point in a preamp?

What information about me do stores get via my credit card?

Can a novice safely splice in wire to lengthen 5V charging cable?

When did F become S in typeography, and why?

Mortgage adviser recommends a longer term than necessary combined with overpayments

Windows 10: How to Lock (not sleep) laptop on lid close?

Am I ethically obligated to go into work on an off day if the reason is sudden?

What is this lever in Argentinian toilets?

Is every episode of "Where are my Pants?" identical?

Are my PIs rude or am I just being too sensitive?

"... to apply for a visa" or "... and applied for a visa"?

How to pronounce 1ターン?

Single author papers against my advisor's will?

Take groceries in checked luggage



i want to loop this program from the start again when the input is yes in python



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceExtracting extension from filename in PythonHow do I remove an element from a list by index in Python?Emulate a do-while loop in Python?How do I trim whitespace from a Python string?Python progression path - From apprentice to guruWhy is reading lines from stdin much slower in C++ than Python?How to remove a key from a Python dictionary?Get unique values from a list in pythonPython: How can I store multiple user inputs when using for loop?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0
















some use is inputting bids on an item and they have a specific buyer number.i can only loop it for bidding on one item.please help me how could i start the program again by asking user in the end if he want to look for another item.




 item_byer=(input("enter the item number 
you want to buy:"))
k=0
for e in (bids_1):
if e==item_byer:
print("item is founded")
break
else:
print("not founded")
k+=1
index_1=(bids_1.index(item_byer))
price=(bids_1[(index_1)+2])
description=(bids_1[(index_1)+1])
print("the price of the item
is,",price)
bids=0
bids=price
print("if you want to enter a bid
please enter this word,bid()")
def bid():
global bids
buyer_num=input("enter your buyer
number!")
highest=input("enter the bid you want
to put on this. make sure it is greater
than previous")
a=0
while int(bids)>int(highest):
print("bids cannot be transfered it
should be greater than current
highest")
highest=input("enter your bid again")
a+=1
if (bids)<(highest):
print("bid accepted")
highest==bids
print("the current highest bid
is",highest)
bids=highest
else:
print("bid denied it should be
greater than the previous")
quit
biding=input("if you want to enter a
bid enter yes ")
if biding=="yes":
bid()
choice=input("if you want to input
another item press yes")









share|improve this question






















  • Read loops, perhaps a while True with a break condition inside.

    – DirtyBit
    Mar 22 at 6:44






  • 3





    Annnd the indentation, Please fix it.

    – DirtyBit
    Mar 22 at 6:45











  • Where is bids_1 defined?

    – DirtyBit
    Mar 22 at 6:47











  • Why do you have break All that could have been summed to just if item_byer in bid_1:

    – DirtyBit
    Mar 22 at 6:48











  • And why do you have k+=1 var when you are not even using it?

    – DirtyBit
    Mar 22 at 6:49

















0
















some use is inputting bids on an item and they have a specific buyer number.i can only loop it for bidding on one item.please help me how could i start the program again by asking user in the end if he want to look for another item.




 item_byer=(input("enter the item number 
you want to buy:"))
k=0
for e in (bids_1):
if e==item_byer:
print("item is founded")
break
else:
print("not founded")
k+=1
index_1=(bids_1.index(item_byer))
price=(bids_1[(index_1)+2])
description=(bids_1[(index_1)+1])
print("the price of the item
is,",price)
bids=0
bids=price
print("if you want to enter a bid
please enter this word,bid()")
def bid():
global bids
buyer_num=input("enter your buyer
number!")
highest=input("enter the bid you want
to put on this. make sure it is greater
than previous")
a=0
while int(bids)>int(highest):
print("bids cannot be transfered it
should be greater than current
highest")
highest=input("enter your bid again")
a+=1
if (bids)<(highest):
print("bid accepted")
highest==bids
print("the current highest bid
is",highest)
bids=highest
else:
print("bid denied it should be
greater than the previous")
quit
biding=input("if you want to enter a
bid enter yes ")
if biding=="yes":
bid()
choice=input("if you want to input
another item press yes")









share|improve this question






















  • Read loops, perhaps a while True with a break condition inside.

    – DirtyBit
    Mar 22 at 6:44






  • 3





    Annnd the indentation, Please fix it.

    – DirtyBit
    Mar 22 at 6:45











  • Where is bids_1 defined?

    – DirtyBit
    Mar 22 at 6:47











  • Why do you have break All that could have been summed to just if item_byer in bid_1:

    – DirtyBit
    Mar 22 at 6:48











  • And why do you have k+=1 var when you are not even using it?

    – DirtyBit
    Mar 22 at 6:49













0












0








0









some use is inputting bids on an item and they have a specific buyer number.i can only loop it for bidding on one item.please help me how could i start the program again by asking user in the end if he want to look for another item.




 item_byer=(input("enter the item number 
you want to buy:"))
k=0
for e in (bids_1):
if e==item_byer:
print("item is founded")
break
else:
print("not founded")
k+=1
index_1=(bids_1.index(item_byer))
price=(bids_1[(index_1)+2])
description=(bids_1[(index_1)+1])
print("the price of the item
is,",price)
bids=0
bids=price
print("if you want to enter a bid
please enter this word,bid()")
def bid():
global bids
buyer_num=input("enter your buyer
number!")
highest=input("enter the bid you want
to put on this. make sure it is greater
than previous")
a=0
while int(bids)>int(highest):
print("bids cannot be transfered it
should be greater than current
highest")
highest=input("enter your bid again")
a+=1
if (bids)<(highest):
print("bid accepted")
highest==bids
print("the current highest bid
is",highest)
bids=highest
else:
print("bid denied it should be
greater than the previous")
quit
biding=input("if you want to enter a
bid enter yes ")
if biding=="yes":
bid()
choice=input("if you want to input
another item press yes")









share|improve this question















some use is inputting bids on an item and they have a specific buyer number.i can only loop it for bidding on one item.please help me how could i start the program again by asking user in the end if he want to look for another item.




 item_byer=(input("enter the item number 
you want to buy:"))
k=0
for e in (bids_1):
if e==item_byer:
print("item is founded")
break
else:
print("not founded")
k+=1
index_1=(bids_1.index(item_byer))
price=(bids_1[(index_1)+2])
description=(bids_1[(index_1)+1])
print("the price of the item
is,",price)
bids=0
bids=price
print("if you want to enter a bid
please enter this word,bid()")
def bid():
global bids
buyer_num=input("enter your buyer
number!")
highest=input("enter the bid you want
to put on this. make sure it is greater
than previous")
a=0
while int(bids)>int(highest):
print("bids cannot be transfered it
should be greater than current
highest")
highest=input("enter your bid again")
a+=1
if (bids)<(highest):
print("bid accepted")
highest==bids
print("the current highest bid
is",highest)
bids=highest
else:
print("bid denied it should be
greater than the previous")
quit
biding=input("if you want to enter a
bid enter yes ")
if biding=="yes":
bid()
choice=input("if you want to input
another item press yes")






python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 6:44









Mohammad HamzaMohammad Hamza

1




1












  • Read loops, perhaps a while True with a break condition inside.

    – DirtyBit
    Mar 22 at 6:44






  • 3





    Annnd the indentation, Please fix it.

    – DirtyBit
    Mar 22 at 6:45











  • Where is bids_1 defined?

    – DirtyBit
    Mar 22 at 6:47











  • Why do you have break All that could have been summed to just if item_byer in bid_1:

    – DirtyBit
    Mar 22 at 6:48











  • And why do you have k+=1 var when you are not even using it?

    – DirtyBit
    Mar 22 at 6:49

















  • Read loops, perhaps a while True with a break condition inside.

    – DirtyBit
    Mar 22 at 6:44






  • 3





    Annnd the indentation, Please fix it.

    – DirtyBit
    Mar 22 at 6:45











  • Where is bids_1 defined?

    – DirtyBit
    Mar 22 at 6:47











  • Why do you have break All that could have been summed to just if item_byer in bid_1:

    – DirtyBit
    Mar 22 at 6:48











  • And why do you have k+=1 var when you are not even using it?

    – DirtyBit
    Mar 22 at 6:49
















Read loops, perhaps a while True with a break condition inside.

– DirtyBit
Mar 22 at 6:44





Read loops, perhaps a while True with a break condition inside.

– DirtyBit
Mar 22 at 6:44




3




3





Annnd the indentation, Please fix it.

– DirtyBit
Mar 22 at 6:45





Annnd the indentation, Please fix it.

– DirtyBit
Mar 22 at 6:45













Where is bids_1 defined?

– DirtyBit
Mar 22 at 6:47





Where is bids_1 defined?

– DirtyBit
Mar 22 at 6:47













Why do you have break All that could have been summed to just if item_byer in bid_1:

– DirtyBit
Mar 22 at 6:48





Why do you have break All that could have been summed to just if item_byer in bid_1:

– DirtyBit
Mar 22 at 6:48













And why do you have k+=1 var when you are not even using it?

– DirtyBit
Mar 22 at 6:49





And why do you have k+=1 var when you are not even using it?

– DirtyBit
Mar 22 at 6:49












1 Answer
1






active

oldest

votes


















2














Since there are so many things wrong with that but sticking to your originally asked question: how could i start the program again by asking user in the end if he want to look for another item.



You could put your working code in a loop and take user input in the end, perhaps:



bids_1 = ['some', 'list', 'of', 'OP']

while True:
item_ = input("enter the item number you want to buy: ")
if item_ in bids_1:
print("item is found")
else:
print("item not found")
userInp = input("Do you want to check for another item? Press Y to continue: ")
if userInp.upper() != 'Y':
break





share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55294219%2fi-want-to-loop-this-program-from-the-start-again-when-the-input-is-yes-in-python%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Since there are so many things wrong with that but sticking to your originally asked question: how could i start the program again by asking user in the end if he want to look for another item.



    You could put your working code in a loop and take user input in the end, perhaps:



    bids_1 = ['some', 'list', 'of', 'OP']

    while True:
    item_ = input("enter the item number you want to buy: ")
    if item_ in bids_1:
    print("item is found")
    else:
    print("item not found")
    userInp = input("Do you want to check for another item? Press Y to continue: ")
    if userInp.upper() != 'Y':
    break





    share|improve this answer





























      2














      Since there are so many things wrong with that but sticking to your originally asked question: how could i start the program again by asking user in the end if he want to look for another item.



      You could put your working code in a loop and take user input in the end, perhaps:



      bids_1 = ['some', 'list', 'of', 'OP']

      while True:
      item_ = input("enter the item number you want to buy: ")
      if item_ in bids_1:
      print("item is found")
      else:
      print("item not found")
      userInp = input("Do you want to check for another item? Press Y to continue: ")
      if userInp.upper() != 'Y':
      break





      share|improve this answer



























        2












        2








        2







        Since there are so many things wrong with that but sticking to your originally asked question: how could i start the program again by asking user in the end if he want to look for another item.



        You could put your working code in a loop and take user input in the end, perhaps:



        bids_1 = ['some', 'list', 'of', 'OP']

        while True:
        item_ = input("enter the item number you want to buy: ")
        if item_ in bids_1:
        print("item is found")
        else:
        print("item not found")
        userInp = input("Do you want to check for another item? Press Y to continue: ")
        if userInp.upper() != 'Y':
        break





        share|improve this answer















        Since there are so many things wrong with that but sticking to your originally asked question: how could i start the program again by asking user in the end if he want to look for another item.



        You could put your working code in a loop and take user input in the end, perhaps:



        bids_1 = ['some', 'list', 'of', 'OP']

        while True:
        item_ = input("enter the item number you want to buy: ")
        if item_ in bids_1:
        print("item is found")
        else:
        print("item not found")
        userInp = input("Do you want to check for another item? Press Y to continue: ")
        if userInp.upper() != 'Y':
        break






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 22 at 7:01

























        answered Mar 22 at 6:56









        DirtyBitDirtyBit

        13.3k41943




        13.3k41943





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55294219%2fi-want-to-loop-this-program-from-the-start-again-when-the-input-is-yes-in-python%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현