for tag

100 questions


2 answers
119 views
0
You want to use Java variables repeatedly by numbering them. What should I do?

int Mnum0,Mnum1,Mnum2,Mnum3,Mnum4,Mnum5,Mnum6,,,,,,,,,,,,,,,,,,, for(int h=0;h<Mnum0.length;h++) for(int h=0;h<Mnum1.length;h++) for(int h=0;h<Mnum2.length;h++) for(int h=0;h<Mnum3.length;...

2 years ago

1 answers
94 views
0
Python for Moon Question.

nStartYear = 2017 nEndYear = 2020 for year in range(nStartYear, nEndYear): for month in range(1,13): yyyymm = {0}{1:0>2}.format(str(year), str(month)) jsonData = getNatVisitor(yyyymm, national_c...

2 years ago

1 answers
84 views
0
Python superposition for statement

If you write the code like above, the first variable tag is repeated, and then the second variable tags are addedCan't you repeat both at the same time?I want to repeat both in this form!I don't know ...

2 years ago

2 answers
80 views
0
It's a question for the return door!

def find_ins_idx(r, v): # Check the data of the already sorted list r from the beginning one by one for i in range (0, len (r)): # If the value of the data in position i is greater than the value of ...

2 years ago

2 answers
98 views
0
Picking data from two lists with Python for syntax and writing to a text file.

ocost = [10,11,40,4,5]buy_list = ['a32','a11','a45','b30','c43']def update_list(self, list): f = open(list1.txt, at) for opencost in ocost: for code in buy_list: f.writelines(code;+code+cost;+opencos...

2 years ago

2 answers
74 views
0
The value of the result of the for repeat statement in Playground during swift study is strange.

I am studying swift. I'm asking you a question because it's weird to use the for statement to practice the book example with playground. for var i = 0; i < 10; i++ { print(\(i) execute)}Result valu...

2 years ago

1 answers
118 views
0
I'm asking you a question!

import java.util.Scanner;public class Pro06 {public static void main(String[] args) { System.out.print(Enter N:); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for(int i = N; i<0;i--) ...

2 years ago

1 answers
103 views
0
Shutil and for questions

import globimport shutilimport osimport sysfilename = glob.glob('**/*.jpg', recursive=True)filename = [os.path.basename(name) for name in filename]for name in filename: if not os.path.exists('jpg_file...

2 years ago

1 answers
142 views
0
I want to run 2 or 3 For statements at the same time, what should I do?

for n in [2,0,-2]: f = int(440*pow(2.,n/12.)+0.5) freq_of_tones = np.append(freq_of_tones, alone_tone(freq=f,dur=0.3)) for n in [0,2,5]: j = int(440*pow(2.,n/12.)+0.5) if n==0: j=0 freq_of_tones =...

2 years ago

1 answers
66 views
0
How do I print out the for statement horizontal?

def divider(file,n): for i in range(0,len(file),n): yield file[i:i+n]for i in range(3):if i==0: name=open('first.txt','r')elif i==1: name=open('second.txt','r')elif i==2: name=open('last.txt','r')inf...

2 years ago
« - 5 - »

© 2024 OneMinuteCode. All rights reserved.