88 questions
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...
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__() ...
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...
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...
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...
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...
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...
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, ...
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...
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...
« | - 8 - | » |
© 2024 OneMinuteCode. All rights reserved.