About 83,800 results
Open links in new tab
  1. python - Repeatedly asking for input | DaniWeb

    Dec 14, 2011 · A common, idiomatic way to keep asking the user for input is a sentinel-controlled loop: run forever and break only when the user asks to quit. Because True is always truthy, …

  2. Restart your python program. | DaniWeb

    Feb 14, 2010 · This snippet defines a function restart_program() which restarts your python program from within your python program.

  3. python - Press Any Key to Continue | DaniWeb

    A classic of early text-based interfaces... Any way to do it in Python? I tried getch (), but it doesn't really work (for instance, if you hit Enter to confirm a menu selection, and then it goes to a …

  4. python - Beginner: How do I read in one bit/byte ... | DaniWeb

    Hello, I have just started learning Python. Please can you tell me if there is a way to read in a file one bit or byte at a time (i.e. in binary). Thank ...

  5. python - How to go back to a line of code...? [SOLVED] | DaniWeb

    Mar 26, 2011 · Python does not have goto; you structure control flow with loops and conditionals. To avoid being prompted twice, do not read the choice before the loop. Instead, print the menu …

  6. python - Changing For loops to while loops and vice ... [SOLVED]

    Oct 8, 2015 · Do not name functions after built‑ins like int; it shadows the real built‑in and leads to confusing errors later. In Python, a bare comparison like i % 3 == 2 by itself does nothing; you …

  7. python - persistence of a number | DaniWeb

    Recommended Answers You need to set y to 1 at the top of the loop so it's initialized every iteration. Your do {}while () condition should be x > 0 since you want to multiply every digit …

  8. video - Creating a GUI Wrapper for VLC Media Player ... | DaniWeb

    Fortunately all of the functionality is bundled in a core library, and the Python gods have seen to it that there is a Python module to interface with that library. This tutorial will walk you through …

  9. python - login program with loop | DaniWeb

    I have to make a login program where the username and password are taken from an existing file. I have successfully, in my opinion, opened, read, and ...

  10. python - If <not number>? [SOLVED] | DaniWeb

    Jul 11, 2008 · I need an if statement that will run if the value is not a number. I am unsure how to do this in python I have tried looking around and I can&#39;t ...