453 questions
Can abstract classes also have constructors? If you can, how do you use it and why?
class Tensor: def __init__(self, data, shape): self.data = data self.shape = shape self.tensor = shape_data(self.data,self.shape) # <-- * def shape_data(self,data,shape): temp1=[] temp2=[] sh...
How do I erase the nth element in std::vector?How do I write functions such as erase() in the source code below?std::vector<int> vec;vec.push_back(6);vec.push_back(-17);vec.push_back(12);vec.era...
In Python, you want to change the element that meets the condition to a different value.temp = ['apple', 'banana', 'coke']for i in temp: if i == 'coke': i = 'grape'print(temp)I thought it would be ap...
data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]for i in data: if data.count(i) == 1: data.remove(i)print(data)output: [2,4,6,8,10,12,14]Why does an odd number work when I tried to erase the only value?
I was working on the Java program, and my friend told me to use the static factory method instead of the creator.I didn't tell you why, but I don't know what this means.
I am a student studying Python.I want to change the for statement below to Python in C, but I don't know how to change it.for (int i = 3; (i*i) <= number; i += 2) { if (number % i == 0) return fals...
Hello, developers. I'm going to make a conditional statement and implement it. if (b!==number) { alert('Number only allowed')}else{a*b}a=What I typed in advance and am currently printing on the screen...
Hello, I'm asking you a question because I don't understand while studying data analysis with PandaSas.def make_generation(age): if age == -1: return 'Not entered' elif age // 10 >= 4: Late 30s e...
Python python -m http.When I entered the command server, there was no error on other computers. But when I input it on my friend's computer, it says, Traceback (most recent call last): and at the end,...
« | - 24 - | » |
568 Who developed the "avformat-59.dll" that comes with FFmpeg?
599 GDB gets version error when attempting to debug with the Presense SDK (IDE)
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
886 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.