class tag

88 questions


1 answers
80 views
0
I want to call the structure declared in class private in C++ in the main function

In the header file, a class named Student has been declared and a structure named collector has been declared in private. I want to make one more cpp file and then make an electro structure in the pri...

2 years ago

1 answers
77 views
0
file separation, class instance sharing

a.pyfrom b import * class A(): def __init__(self): super().__init__() self.a = 1 self.b = B() self.c = self.b.sum()b.pyfrom a import * class B(): def __init__(self): super().__init__() ...

2 years ago

1 answers
86 views
0
When collecting data through web scraping, the classes are the same

Hello, I'm a beginner at Python.I'm doing web scraping on a site called fnguide, and I want to find the necessary dataBoth classes are the same.Ha...This is really unexpected, so I'm embarrassed.How d...

2 years ago

1 answers
68 views
0
Is it impossible to transfer functions to Python3 class?

class PrintFuncNum: def __init__(self, func): self.func = func def check(self, test): answer = self.func(test)test1 = PrintFuncNum(func) # You can put test*3 in the answer in the check part# Or I wo...

2 years ago

1 answers
82 views
0
Java method problem.

class Adder{ int value; int var1; public Adder(int x){ this.var1 = x; } public int add(){ value += var1; return getValue(); } public int getValue(){ return value; }}class Solution { public int sol...

2 years ago

1 answers
73 views
0
JAVA Syntax Meaning Inquiry

public class BubbleSort{public static void bubbleSort(int[] arr) { for(int i = 0; i < arr.length; i++) { for(int j = 0; j < arr.length - i -1 ; j++) { if(arr[j] > arr[j+1]) { int temp = a...

2 years ago

1 answers
67 views
0
Python-related concept questions 1. Meaning of the list as dir 2. Meaning of str, int as class

Hello, I'm an introvert to Python.Recently, I've been coding through various questions and studying Python concepts, and I'm leaving a question like this because I have a question. I'm sorry it's a bi...

2 years ago

1 answers
71 views
0
Store only values in a specific location in the dictionary

class Data(object): def __init__(self): self.name = list(rank.values())[0]dataset = Data()I want to extract only the first name from the dictionary named Rank in the picture and save it in the list, ...

2 years ago

1 answers
120 views
0
Inheritance question for class

class cal: def __init__(self, one, two): self.one=one self.two=two def add(self): result=self.one+self.two return result def mul(self): result=self.one*self.two return result def sub(self): res...

2 years ago

1 answers
65 views
0
Python's class method is not well understood.

import randomclass Account: # # class variable account_count = 0 def __init__(self, name, balance): self.deposit_count = 0 self.name = name self.balance = balance self.bank = SC Bank # 3-2-6 num...

2 years ago
« - 8 - »

© 2024 OneMinuteCode. All rights reserved.