loops tag

55 questions


1 answers
67 views
0
Print out all beginner repeat cards

Hello, I'm a student who just learned coding.I have to print out the results below, but it's not as easy as I thought.symbol_list = ['Spade','Heart','Diamond','Clover']for i in range(1,53): for j in s...

2 years ago

2 answers
69 views
0
Python Beginner: A function that tests the sum of two elements in the list

It's a function that adds two different elements from the list and returns 1 if the value becomes K, otherwise returns -1No matter what you put in K, only -1 will be returned. Which part should I fix ...

2 years ago

1 answers
86 views
0
Is the initialization part included when calculating the loop-type time?

I'm a soldier who takes a data rescue class by himself.Honestly, I wonder why I'm asking this question myself,I'm asking you a question to get an answer.Suppose the for statement is as follows.for( i ...

2 years ago

1 answers
62 views
0
Python ends in the middle

The upper code was cleared in the middle. I want to end the program execution in two parts of the shop. Please let me know. list_input = []while True: x = input (Enter a positive integer). : ) intorn...

2 years ago

1 answers
66 views
0
I have a Python question.

Bloods = ['a', 'b', 'ab', 'o']i=1while i<=10: list = input('Blood donated (a, b, ab, o) :') i+=1while i>10: breakj=1for i in range(len(list)): print(list[j], '', end='') j+=1I did this, but an e...

2 years ago

1 answers
143 views
0
C language: I want to make sure that if the result is duplicated, it is only the minimum box

It is a problem to put 12~17kg of sugar in boxes of 3KG and 5KG so that the weight of the box is minimal without leaving any weight. I want to make it so that if it comes out in duplicate in the code ...

2 years ago

1 answers
106 views
0
For door

How do I make this part simple as a for sentence?

2 years ago

1 answers
94 views
0
I have a question about applying Python for loop file name.

BL0001, BL0002, BL0003, there are thousands of files like thisI want to spin this specific command and create an output file with the same name.I was going to make this for loop, but when I designated...

2 years ago

1 answers
96 views
0
Dividing Data Frames Using Panda's Beginner Repeating Statements

Hello, Python. I'm a beginner at Panda's.Declare the entire data as F1I would like to declare it as data by dividing it 97 times by 2,000 eachThat is, F1_0 is from index number 0 to 1999, F1_1 is from...


1 answers
89 views
0
The first time you want to go to the repeat using continue in a multiple repeat statement,

Hello, everyoneThere are several repetitive statements, and I want to start with the first repetitive statements under certain conditions, what should I do?I don't know what to do# Omit the above code...

2 years ago
« - 5 - »

© 2024 OneMinuteCode. All rights reserved.