for tag

100 questions


1 answers
426 views
0
For, while

For statement hap=0for n in range(1234,4568): if n%444 ==0: hap += nprint(hap)How do I change this to a while statement

1 years ago

1 answers
340 views
0
Problems that arise when compliance is converted into a general for statement

# Create Dictionary loc_mapping = {val : index for index, val in enumerate(strings)} # It doesn't mean val = index, but it means to express it in the form of val : index.loc_mappingWhen you run , you ...

1 years ago

2 answers
115 views
0
Python for Moon Question

Number 1 hap=0for a in range(1,11): hap=hap+a print(hap)Value is 13610152128364555Number 2 hap=0for a in range(1,11): hap=hap+aprint(hap)The price55Number 3 hap=0for a in range(1,11):hap=hap+aprint(ha...

2 years ago

1 answers
110 views
0
Python, I have a basic question.

After the repeat statement is over, shouldn't you exit the repeat statement and run the following...?I wrote it in my heart, but why isn't it working?And how do I get print(a) executed?(This is the cm...

2 years ago

1 answers
107 views
0
I have a question for you.

I've been doing this and that for a week, but I couldn't get the results, so I'm inquiring. I want to receive stock price data as Excel data at once as below, but I want to get various data at once by...

for
2 years ago

1 answers
110 views
0
For Moon, please help me

It's Java.I'm going to make a lotto number application simple.In the For Moon, where you turn the order according to the number of spinners,If you take a picture of log, there are 3, 4, and so onThe a...


2 answers
131 views
0

1 answers
149 views
0
I want to print only the last value of the for statement in the code below.

#pragma warning (disable:4996)#include<stdio.h>int main(void) { int cnt = 0, digt_cnt = 0, i, total = 0; char c; while (c = getchar()) { if (c == 'q') return 0; ++cnt; {if (c >= '0' &...

c for
2 years ago

1 answers
85 views
0
It's a question about Python beginner for Moon

//for i in range(5): for j in range(i+1): print('*',end='') print() for i in range(5): for j in range(5-i): print('*',end='') print()When I do this, it becomes double cloth, so the shape I want do...

2 years ago

2 answers
151 views
0
Python-Repeat List 2 with each argument in List 1 without duplication

How do I simplify the code below?Newlist =[ ]A_list = [a, b, c, d, e, f]page_list = [1, 4, 5]''''''''''''''''''for 'A' in A_list:names1 = Class Method Function (type='A', page=1)Newlist.extend(names1)...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.