Questions tagged [loop]

The tag has no usage guidance.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

Final Project - if statement with regex not working?

Working on my final project and I'm stuck trying to edit user input. The below code should take the first string in a list and check if it's numeric. If it is, great, that's what I want, otherwise, I ...
0
votes
2answers
42 views

Why the if statements don't work when I put them into loops? Caesar PSET2

Help, please. The program works fine until I want to add the loops and when I do that the if statements inside it won't work and it will just ask for the key and will output the same text as the input ...
0
votes
0answers
101 views

solved pset6 BUT still wondering

while reading the CSV file in these lines : csv_file = open(sys.argv[1], "r") # reading the csv file into memoery csv_reader = csv.DictReader(csv_file) when i tried to make a copy of the csv_reader ...
0
votes
0answers
23 views

skip many loops error

I want if found something skips 4 or 5 loops if a = 20 and found something a will be 35 but didn't work why for a in range(len(cont)): if cont[a:a + len(str[c])] == str[c]: temp += 1 ...