About 400 results
Open links in new tab
  1. do-while loop in python [SOLVED] | DaniWeb

    Python does not have a built-in do...while, but you can emulate "run at least once, then decide" cleanly. Use a boolean updated at the end of each iteration (avoid strings like "true"/"false", …

  2. 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 …

  3. Find the factorial of a number using do ... | DaniWeb

    Mar 30, 2010 · Write a C program to find the factorial of a number using do while loop? - Topic in the Software Development forum contributed by sayoojya

  4. python - Converting celsius to fahrenheit using a ... [SOLVED]

    The formatting options are documented in the Format Specification Mini-Language. If you prefer a different loop construct later, this logic translates directly to a for loop over a sequence; see …

  5. python - Modifying this random word program [SOLVED] | DaniWeb

    Dec 5, 2008 · Finally, this is Python 2 code: use raw_input for text, and do not use return unless you are inside a def, as noted by @Murtan. Here is a compact, loop-only version that honors …

  6. Finding the largest and smallest numbers in python

    Nov 6, 2012 · #Name: Calum Macleod #Date : November 6, 2012 #Purpose: A Python program with a loop that lets the user enter a series of whole numbers. #The user should enter the …

  7. 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 ...

  8. 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, …

  9. python - Tkinter Restart program | DaniWeb

    Feb 12, 2012 · hi, is there any way to restart Tkinter program while running. I would like to put some button that will when pressed put everything as it was in moment ...

  10. python - Loop through a year [SOLVED] | DaniWeb

    Two small improvements make this task simpler and more robust in modern Python. First, iterate with an end-exclusive boundary instead of guessing the number of days. This works for any …