Search found 58 matches

by Phantom
8 years ago
Forum: C/C++/C++11
Topic: Te cycles
Replies: 7
Views: 6501
Gender: None specified

Re: Te cycles

Robbin wrote:Esto me recuerda el Lenguaje Ensamblador ;)
Of course!! C++ is more like Assembler. :lol:
by Phantom
8 years ago
Forum: Other languages
Topic: Ruby
Replies: 23
Views: 19260
Gender: None specified

Re: Ruby

Here your example…: def printHelloWorld() --puts "Hello World!!" end printHelloWorld() I put the “Hello World” in a function, because you want the declaration of a function. In Ruby are a “print” too, but “print” is like a “printf(“Hello World”);” in C++ (without the ‘\n’ at the end). You see?? Is a...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

---This “self” mean that the method, is an instance method. This “self” is like the “this” in C#, C++, Java, etc. to refer to the actual instance. ---Now, In Python you can do “static methods” too. If you want that, you write: @staticmethod def pepe(val…): … #in this case you have not put the “self”...
by Phantom
8 years ago
Forum: Other languages
Topic: Ruby
Replies: 23
Views: 19260
Gender: None specified

Re: Ruby

Jajajaja In my opinion, Ruby is a strong language for the same reason that Python is a strong language. If you understand why Python is a strong language, you understand why Ruby is a strong language. In my opinion Python and Ruby is almost the same, with the difference that one recognize for indent...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

Jajajaja My brother was the first person in talk to me about Python and it’s strong. Since I began to learn Python, I decided be a Python prophet :D I had something hidden for you. You wanted a tree, and I implemented for you a Binary Search Tree with everything: Insert, Remove, Search and the diffe...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

hey: I got another question: how can I read an entire string on a cicle? :?: if I put: for i in range(range): a=raw_input() it doesn't work help me of course!! How you expect that work?? range is a function that return a list of values beginning in 0 and ending in the predecessor of the number you ...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

First: you wrote well "etcetera", in english is in this manner (without tilde). Second: Yes, as you said. You can also add attributes to a class after it created. For example: class Friend:pass pepe = Friend() pepe.Name = "Pepe" pepe.Salute = lambda: "Hello, people!!" Now pepe have the "property" -N...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

Yes, I have some goods books and tutorials. If you want, give me your email, and I'll send you some documentation. The classes in Python is very simple, but... previously I want you know somethings. In Python are specials methods that give to the class an especific property. For example, if you want...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

:lol: Sorry if I didn´t explained very well. ----I´ll answer first the second question(How do I use the words "sequence" and "condition"?) 1.1)When I say "sequence" I refer to that :) , to any collection, for example: sequence = 1,2,3,4,5,6 equivalent to: sequence = (1,2,3,4,5,6) sequence = [1,2,3,4...
by Phantom
8 years ago
Forum: Other languages
Topic: Python
Replies: 36
Views: 32795
Gender: None specified

Re: Python

You have to see the matrix in Python as an array of array. You know how read an array. For this reason, you can do this: cant = input() #imagine they tell you first the number of rows matrix = [[int(i) for i in raw_input().split()] for i in range(cant)] #in just a line of code :D As well, you can wr...

Go to advanced search