Need help understanding this while loop - Python discussion
Feb 13, 2024 ... I'm new to while loops, and I don't quite get what's going on in this code from my book: current_number = 1 while current_number <= 5: ...
Feb 13, 2024 ... I'm new to while loops, and I don't quite get what's going on in this code from my book: current_number = 1 while current_number <= 5: ...
Feb 5, 2024 ... Christopher : quest1s = input("?: ") while quest1s != (organs, cells, organisms, tissues, organ_system): word = input("That is not A, B, C, ...
while is_word_guessed(secret_word, letters_guessed) == True: just to see if the change from True to None would break the loop. Anyway, any help pertaining to the mentioned function call or its use within the code as a whole would be greatly appreciated!
Nov 8, 2022 ... ... while loop, which I don't think was your intention. A more general piece of advice, your program has way too many code paths. It's quite ...
Rather than while loop (where you would later have to “increment” your string to the next letter), why not make it a for loop?j = chr(ord(j) + 1) i += 1. I’m using an online textbook so I’m not sure how libraries/modules work on it. I’m getting the following error when I try the code your way
Jun 9, 2022 ... This code has a some string swapping but otherwise is simple and very readable. ... program it all linearly and learn about strings and loops.
I have a problem with saving values to file using write(), essentially the program accepts 3 numerical values then stores them as strings in a textfile labeled “scores.txt”.
Jul 12, 2023 ... Hello, I have a problem with 'while' in the following code: for ... For example, you can use a string (you get one character each time) ...
Jan 28, 2023 ... You don't import time , though I suspect that you didn't copy the code exactly as you've been running it (there's a stray < there too).
Feb 10, 2022 ... Have you tried break instead of pass ? That should break the while loop. ... thanks for the help! Home · Categories ...