- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 16
- Posts with Upvotes
- 16
- Upvoting Members
- 11
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Experienced Software Engineer with a passion for creating technology improving human life.
- Interests
- JavaScript, TypeScript, C++, Python, Nodejs, Angular, React, Embedded Systems
Re: Uh oh he's using the same book I was using, lol. This worked fine for me:[CODE]from tkinter import * class Application(Frame): def __init__(self, master): super(Application, self).__init__(master) self.grid() self.create_widgets() def create_widgets(self): self.bttn1 = Button(self, text ="I do nothing!") self.bttn1.grid() self.bttn2 = Button(self, text ="Me too.") self.bttn2.grid() self.bttn3 = Button(self, text ="Same … | |
Re: A question on the topic of background colors, is there a way to make an entire Frame's background white, including unassigned space? And, without getting those nasty grey areas around labels and windows? | |
Re: Do you have a link to the CDN for jquery? What does your console output say? | |
Re: [QUOTE=Netcode;1669092]Looks interesting and fun. Thanks for the introduction vegaseat. If i may ask, what good books would you recommend for starters?[/QUOTE] How to think like a computer scientist is great for beginners as is Python programming for the absolute beginner. If you already have experience with a programming language head … | |
Re: Python is a GREAT place to start. You can easily learn the fundamentals of programming with a powerful language that's almost as clear as English. It's been said, and I'm not saying I necessarily agree, that it would be possible to use only Python for anything you ever needed to … | |
Re: [QUOTE=LeonKam;1625020]this is what i am trying to do 1)create a java program for a computer that can send and receive message (Instant messaging) 2)create a java program for a mobile phone (Instant messaging) 3)connect this two application together so both of can receive message from one another.. that's the basic … | |
Re: Matzek, so you know people are much less likely to respond to an old thread, it's advised to start your own. | |
Re: Okay, I haven't been on in a while, let me tell you why no one has replied, you haven't showed ANY effort. Let me see the code you have so far and I'll tell you what you're doing wrong and give you suggestions. This is a simple solution, and you … | |
Re: Don't forget about the reversed() BIF here, it could save you a few lines:[CODE]def is_pal(word): rev_word='' for letter in reversed(word): rev_word+=letter if word==rev_word: return True else: return False[/CODE] likewise, it's much simpler and easier to maintain. | |
Re: Well, with split, just as the name implies you could split the string,into a list, in this case at the semicolon [CODE]>>>a='some;data' >>>a 'some;data' >>>a=a.split(';') >>>a ['some','data'][/CODE] | |
Re: Okay, well what do you need the dictionary to be of? Also, directly copy and paste your code into the[CODE][/CODE] encapsulation so the indentation is correct. | |
Re: fyi, there is no elseif in python... | |
Re: Oh, please tell me someone finally got caught doing that by their teacher. Also think about range, it should take you about 45 seconds to do this program if you just take a moment to think about it. | |
Re: [QUOTE=woooee;1675188]I don't know about anyone else, but I'm getting a little tired of the "I goggled for this" lie [url]http://tinyurl.com/3ldotwl[/url] Perhaps we should boycott the too obvious fibs and point them out as above. Edit: But then I guess that's the same thing, as that's doing the search effort which … | |
Re: The way I'm interpreting it is like:[CODE]that='''450 42.5 16625.0 460 42.0 16820.0 470 41.5 17005.0 480 41.0 17180.0 490 40.5 17345.0 500 40.0 17500.0''' this=that.split('\n') price=None for info in this: data=info.split() if price==None: price=data[1] elif data[1]<price: for info in data: print('XXXX is %s'%info) break[/CODE] output:[CODE]>>> XXXX is 460 XXXX is … | |
Re: issues: -input is a BIF -fix your indentation -think about it; how would you use the functions on anything? That should help you use them in the main() function -I'm sure there are more but I don't feel like analyzing this whole thing with the indentation all messed up, it's … | |
Re: It's quite possible that is because people haven't used that or don't have much experience with it; it's not a matter of not wanting to help. Sometimes you just have to dig and dig to find you own answer, and I'm sure we'd be happy to see the result if … | |
Re: I suggest befriending and/or joining a group of community sites or a community hub. For example many malls and outlet malls have their own facebook pages, if you're in or near that mall you should befriend it and post updates and info on there. Also, several small towns may have … | |
Re: -Are you sure the file is in the same directory as the program calling it? -you don't append to a dictionary, you can append to a value if that value is a list or you can update a dictionary. -if you could you're trying to add the file the dictionary … | |
Re: Well Jose, first how would you determine this matematically? then show us that you've written the pseudo-code. | |
Re: You need to show some effort, but first think about what's happening, obviously it knows the LENgth of the word and displays dashes for letters that haven't been guessed and IF the letter guessed is IN the word then it will show that letter. You need to make the function, … | |
Re: I like dictionaries, I made a function see if you can tell what it does from this:[CODE]>>> grade_buk=[('tom',4),('ben',5),('tom',8),('ben',12)] >>> grades=average(grade_buk) >>> for key in grades: print(key.title()+':',grades[key]) Ben: 8.5 Tom: 6.0[/CODE] | |
Re: well think about how you would skip them...what is the easiest way to distinguish that particular piece of data from the others? To me it looks like maybe it's the fact that data[0] is in ['',' ','\t'] "not sure which it is" where data is the line | |
Re: Why don't you just use a label widget? | |
Re: have you tried a lambda? like:[CODE]>>> lis [(1, 'A'), (3, 'D'), (1, 'Z'), (3, 'F')] >>> >>> fixed=sorted(sorted(lis,key=lambda s: s[1]),key=lambda i: i[0],reverse=True) >>> >>> fixed [(3, 'D'), (3, 'F'), (1, 'A'), (1, 'Z')] >>> [/CODE] | |
I'm trying to use cx_Freeze and everything everything seems like it should work fine, however I'm getting an import error for import tkinter [CODE]Traceback #... from tkinter import __fix #... import_tkinter ImportError: DLL load failed: The specified module could not be found.[/CODE] This only happens when I take the the … | |
Re: well think about what you would need to do; you'd need to either have a list of the images or be in a specified directory to browse through the images in that; some useful tools might be: tkFileDialog, askopenfilename PIL,Image, ImageTk (ImageTk.PhotoImage) os | |
Re: [QUOTE=terry35;1668458]When I open python I am unable write my code in it. This just started to happen no idea what is happening? Its unclickable inside but I can click the bar on top. Anybody know?[/QUOTE] What do you mean? Like you're unable to edit a program you've made, or IDLE … | |
Re: [QUOTE=radiumc;1667586][CODE]file1: /users/ux454500/radpres.tar /paci/ucb/ux453039/source/amr.12.20.2002.tar~ /paci/ucb/ux453039/source/amr.1.25.2003.htar.idx /paci/ucb/ux453039/source/amr.1.18.2003.htar.idx file2: DIRECTORY /paci/ucb/ux453039/. FILE /paci/ucb/ux453039/.ktb_ux453039 05/31/2006 17:52:04 09/01/2007 14:25:33 FILE /paci/ucb/ux453039/source/amr.12.20.2002.tar~ 03/10/2005 20:56:50 09/02/2007 10:35:41 FILE /paci/ucb/ux453039/source/amr.1.25.2003.htar.idx 02/23/2007 14:20:15 08/27/2007 14:53:48 FILE /paci/ucb/ux453039/bhsf1.0000.out 02/23/2007 14:20:13 08/27/2007 14:53:48 FILE /users/ux454500/AIX.mpCC.DEBUG.ex 02/23/2007 14:20:13 02/28/2007 14:47:55 DIRECTORY /paci/ucb/ux453039/runs/bondi file3: DIRECTORY /paci/ucb/ux453039/. FILE /paci/ucb/ux453039/.ktb_ux453039 05/31/2006 17:52:04 09/01/2007 14:25:33 FILE … |