Skip to content
Advertisement

Tag: loops

Items not being appended properly

I was working on the following code which will take input the scrap which has a few phrases as: Now I want the phrases in scrap which have used the words in prog_list to be appended to TRUE_PROG : I wrote a simple code having loops in it, but it produces an output that I didn’t expect: PROGRAM CODE: If

How to merge all of the output lists into one list [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 12 months ago. Improve this question I was trying the following code snippet for a project of mine: I

How to keep running a nested While in python

I have a pygame. in it there are a few nested while loops, running all of them one time accomplish one round, how do I keep rounds going and going, never stop? Repeat{I have a pygame. in it there are a few nested while loops, running all of them one time accomplish one round, how do I keep rounds going

Python counting up (1+2+3 etc.) until input value

How to keep counting up (1+2+3) until user input value? This is my code so far, I can’t figure out how to keep increasing the value by one at a time… the goal should be e.g if input value was 2 to print 3 and if 10, 10 and 18, 21. Answer The problem with your code is you always

Bash for loop containing python script

New here! I’m trying to loop a python script in bash that gets stats from fastq files. I want it to loop through all the fastq files in a directory and save the outputs in a text file. Ideally don’t want to edit the python script This is the script that works when I’m not looping it: This is the

Is it possible to improve my zigzag indicator loop?

I have read on SO and replicated an indicator for stock prices that works as intended. It’s called ZigZag and projects peaks and valleys on historical prices. I pass a pandas dataframe with OHLC prices to my ZigZag class. My problem is that it runs really slow, I have about 70 stocks with 10k rows each. takes about a minute

Advertisement