Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
Can i write a function outside an object and associate it with multiple different objects sharing some common property upon which the function operates (turning it to a method for all these objects)? If not , whats the use of defining a method outside the object and assigning it to an object property?
4 Votos
4 Respostasdef add(x, y):
return x + y
def do_twice(func, x, y):
return func(func(x, y), func(x, y))
a = 5
b = 10
print(do_twice(add, a, b))
Please explain step by step
Which is caller here?
Explain the 3rd and 4th line ?
why in 4th line we write add(add(x,y),add(x,y)) which is function of 1st line ?
how can we write function after return statement insted of (x+y+x+y )=30?
0 Voto
2 Respostasmy_sort
0 Voto
1 RespostaI want write once program but I can't!, if we write "cout<<"Hello world" ; in a console we can see momental"hello world" and nothing, but now I want see hello world like a gif animation, every letters must be showing step by step, first "H" second "e" and "l" all letters step by step in every sek time, it's possible?, excuse me I am Russian.
0 Voto
2 Respostas9
2 Votos
6 RespostasWrite a program to return the area of Geometricshapes square and rectangle. Area of square is side*side, rectangle is length*breadth. The controlling class should display the following menu and respond to the userās selection
Mean
1. Calculate area of square āØ
2. Calculate area of rectangle āØ
3. QuitāØEnter your choice (1-3):
0 Voto
3 RespostasWrite a program that uses a dynamic array that contains 5 items of double values. The size of the array is entered when the program is run. Aldo the 5 values must be entered. These tasks are done in the main ( ) function. Then write a function to display the 5 values. The function must have a pointer variable as a parameter. The function is called from the main ( ).
0 Voto
2 RespostasQuente hoje
Notifications
5 Votes
Is the AI course worth the $49?
0 Votes
I want to make it how can i
0 Votes
Flexbox Layout question
2 Votes
How to win bits
1 Votes