Skip to content
Advertisement

Tag: while-loop

Finding an index in a list

I have an html file which I open in notepad and read in python as list the html is done like this: I’m making a search on word “data” and from there I manipulate the string in order to get the data. Since I need to iterate this research and I don’t want to start everytime from the first “data”/”time”-row,

For loop monthly budget program creating error

I am running this for loop code and it is creating an error, I cannot find out the problem with it Any ideas on why I am getting this error? I have tried to figure it out on my own but I dont know why it is wrong Answer Your problem is that the for-loop variable month is an integer,

increase the value of x by 1 [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 months ago. Improve this question

Two while Loop Statements showing different results

I am new to python and struggling with 2 simple sets of code in which there is while loop used with a little difference (atleast in my opinion). These code should print ‘i’ while it is less than 6 but one set of code is printing ‘1 2 3 4 5 6’ and the other is printing ‘0 1 2

While/For/If Else Loop after checking user input

I’m new to Python and learning. I’m trying to write a program to: User input full name (with space) Check duplication to a list (I used split and join to compare strings) If find a duplication, re-input new name If not, simply break the loop and print “Thanks” I only need to print “Duplicated” or “Thanks” 1 time, not multiple

Advertisement