Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Compare dictionaries in list
Post: RE: Compare dictionaries in list

Hi killerrex, Great! Thanks a lot.
vaison General Coding Help 2 2,548 May-10-2018, 09:05 AM
    Thread: Compare dictionaries in list
Post: Compare dictionaries in list

Hello, I have a list of dictionaries and I need to compare some values of all of them. I only need to know if all of the comparison values are different or not. I need to know if any 'name' in the...
vaison General Coding Help 2 2,548 May-08-2018, 09:44 PM
    Thread: Inheritance private attributes
Post: RE: Inheritance private attributes

Hello, ok, thanks for the aclarations. I have it much clearer.
vaison General Coding Help 5 12,790 May-03-2018, 09:22 AM
    Thread: Inheritance private attributes
Post: RE: Inheritance private attributes

Thanks Larz60+ By the way ... I do not see many examples of private attributes in Python. It seems that they get used to using public attributes. I have been years without programming, but in C, C ++...
vaison General Coding Help 5 12,790 May-02-2018, 08:56 PM
    Thread: Inheritance private attributes
Post: Inheritance private attributes

Hello guys, I'm trying to inherit private attributes (self.__attrib), but when I use the parent __init__ method this private attributes doesn't inherit. For example: class Primary(): def __init__(s...
vaison General Coding Help 5 12,790 May-02-2018, 08:18 PM
    Thread: The Collatz Sequence
Post: RE: The Collatz Sequence

Hello, Do you want that when you input 1, the loop condition doesn't acomplish? while n != 1:Then, if you input 1, there should not be any print at the output. Not? I said that you are comparing a ...
vaison Homework 11 14,119 Apr-19-2018, 10:23 PM
    Thread: for loop with 2 conditions
Post: RE: for loop with 2 conditions

Hi, thank you. I will work with this. When I have it done, I will write it here. ;)
vaison General Coding Help 9 6,160 Apr-19-2018, 01:28 PM
    Thread: The Collatz Sequence
Post: RE: The Collatz Sequence

Hello, I think that in your first iteration you're still comparing a char with an integer. Try to introduce '1' and verify if the execution doesn't enter to the loop. I think that you must do the cas...
vaison Homework 11 14,119 Apr-19-2018, 11:03 AM
    Thread: for loop with 2 conditions
Post: RE: for loop with 2 conditions

Ok ODIS, I try it.. ;) Remember my low English level if I'm wrong whith any word... First of all, thank you. I've a buffer that reads from a queue (a kafkaConsumer, but it is not relevant). Then I...
vaison General Coding Help 9 6,160 Apr-18-2018, 02:29 PM
    Thread: Helpful exercises
Post: RE: Helpful exercises

Maybe this interests you... http://swcarpentry.github.io/python-novice-gapminder/
vaison General Coding Help 4 3,435 Apr-18-2018, 01:47 PM
    Thread: The Collatz Sequence
Post: RE: The Collatz Sequence

Hello, the main problem is that your function doesn't return any value, like mlieqo says. Also you have two points more to revise: 1- input function returns a 'char'. Then you are comparing in your ...
vaison Homework 11 14,119 Apr-18-2018, 01:41 PM
    Thread: If Statements
Post: RE: If Statements

Hello, maybe, an other option is to use dictionaries: name_age = {1: "Bab", 15: "Beb", 30: "Bib"} age_in = input() name = name_age[int(age_in)] print(name)The dictionary should contain all the names...
vaison General Coding Help 6 3,741 Apr-15-2018, 10:13 AM
    Thread: develop android app on Win env
Post: RE: develop android app on Win env

Hello OJ1, I have used Android Studio on Win10 and the behavior of the software (Android Studio) has been very unstable. Then I try to use Android Studio on Ubuntu, and it works perfect. About Pyth...
vaison General Coding Help 2 2,871 Apr-15-2018, 09:53 AM
    Thread: If Statements
Post: RE: If Statements

Hello, My English level is low, and maybe I don't understand well, but if you want to read from keyboard, the basic form can be: print("How old are you?") age = input()Bye
vaison General Coding Help 6 3,741 Apr-14-2018, 08:33 PM
    Thread: build pandas dataframe from a for loop
Post: RE: build pandas dataframe from a for loop

Hello scidam, great! Thank you!
vaison Data Science 4 60,147 Apr-14-2018, 04:34 PM
    Thread: for loop with 2 conditions
Post: RE: for loop with 2 conditions

Hello ODIS, thank you. It works. My English level is low and for this, I simplified the problem, but really I don't have a list (l1), I've a buffer that I don't know how many elements it has, and it...
vaison General Coding Help 9 6,160 Apr-14-2018, 11:32 AM
    Thread: build pandas dataframe from a for loop
Post: RE: build pandas dataframe from a for loop

Hello scidam, I've adapted it to my program and it works! Thank you. But in my first message I have simplified the problem a little... ;) I was afraid of not explaining myself well and that's why I ...
vaison Data Science 4 60,147 Apr-14-2018, 11:22 AM
    Thread: for loop with 2 conditions
Post: for loop with 2 conditions

Hello, I'm testing to use a for loop that stops by 2 conditions. For example: l1 = ['hello', 'bye', 'now', 'before', 'after'] count = 3 for word in l1: print(word)But I want to stop not only when l...
vaison General Coding Help 9 6,160 Apr-14-2018, 02:03 AM
    Thread: build pandas dataframe from a for loop
Post: build pandas dataframe from a for loop

Hello, this is my first post about Python, and also this is my first post in English. So... thank you for your patience :)... And sorry for my low english level, I'm practicing to improve. I want t...
vaison Data Science 4 60,147 Apr-14-2018, 01:52 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020