15,190 Topics
![]() | |
hey guys.i have one realy big big problem.. My programming teacher gave my a task to get these functions to work, but i dont know python program so good.. thats why maybe someone of you could help me, and make these 3 functions to work .:).. please!! these lines are … | |
I need help with this. At the end of the semester, students often wish to know what grade they need on the final exam to get an A in the course. Write a program that prompts for the user’s grades on exam 1, exam 2, and the homework and from … | |
I have this program I'm trying to write, a simple application with gui: a menu and a button. Whenever I go to run it, this is the error I get: Traceback (most recent call last): File "/Users/[I]myname[/I]/Documents/School/Programming/Window.py", line 27, in <module> app = Application() File "/Users/[I]myname[/I]/Documents/School/Programming/Window.py", line 14, in __init__ … | |
I am new to this whole programming thing. I am currently using python 3.2. I want to get into trying to build GUI, but i can't find any programs that seem to work with python version 3.x. Should I downgrade to an earlier version of python? If so what is … | |
I need to write a function that takes in an array of integers and an integer, checks if the sum of any of the numbers in the array is equal to the supplied integer. Any ideas would be much appreciated. | |
[CODE]background_image_filename = 'sushiplate.jpg' sprice_image_filename = 'fugu.png' import pygame from pygame.locals import * from sys import exit pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) background = pygame.image.load(background_image_filename).convert() sprite = pygame.image.load(sprice_image_filename) # our clock object clock = pygame.time.Clock() x1 = 0. x2 = 0. # speed in pixels per second speed = … | |
I've built my fair share of computers and figured it was time to learn to take advantage of that hardware by learning to program. So I'm taking some courses online. I'm having some issues writing some programs though, so any help would be appreciated. Right now, I'm stuck on this … | |
Hi! I am using a label widget in order to display a n rows and m columns matrix. My program allows repeated generation of a random matrix of integer (of arbitrarily number of rows and columns) - I am observing these matrices by representing them in a Label type widget. … | |
Here's the problem. Bought a new wireless printer, HP B209a. Have a wireless router, Belkin, been using it for years. I take it, the printer, out of the box, follow all the instructions on setting it up, run the setup program in a laptop, following all on screen instructions. It … | |
Im pretty new to Python (2.7) and no programming experience before. Anyway Im in the process of learning python but have a mysterious error that I can't figure out. Whenever I put equal sign in print statement, I get syntax error. here's an example code [CODE]def main(): f = open('lines.txt') … | |
from random import randint correct = 0 for i in range(10): n1 = randint(1,10) n2 = randint(1,10) prod = n1 * n2 ans = input('What's %d * %d? ' % (n1,n2)) if ans == prod: print('That's Right! Well done.') correct = correct + 1 else: print('No, I'm afraid the answer … | |
hi friends, can u help me? | |
Hi, I am a beginner in linux . i am using matchbox virtual keyboard for an application now i want to change the layout to another langauge . How to do it? Is there any way to change the layout from terminal . Kindly advice me suggestions. Any help appreciated … | |
Hi everyone! I'm a newbie here. I have a problem: I need to create the address book in python that include name, phone number, email, address, etc...The information in the address book can able to delete or change. I will give more information later! Can you help me? I need … | |
Hello, I'm trying to call a Python module in Java application using JEPP. I'm able to invoke the python modules from java Appl, but i'm not able to call the modules in python class from java appl. Python Code Code: [code] class SampleClass: def [b]callPythonModule[/b](self): print 'The Python Class module … | |
[B][I][U]Introduction[/U][/I][/B] Hey guys today I am writing a tutorial on Lists and tuples in Python.... So lets get started... [B][I][U] Layout:- [/U][/I][/B] 1.What are data sturctures? 2.What are tuples? 3.What are lists? 4.inbuilt functions on lists and tupples [B][I][I][U] What are Data structure?[/U][/I][/I][/B] Anybody familiar with programming or Actually Computers. … | |
Is there any tutorial for Ironpython and Winform out there that's good? A book that's free would be nice. Also if it involves sharpdevelop it would be pretty kickass. | |
I read a lot of car classes on several sites and still can't get mine to work. Any ideas? [CODE]##Car class class Car: def __init__(self, y_model, make, speed): self.y_model = y_model self.make = make self.speed = speed def set_year_model(self, y_model): self.y_model = y_model def set_make(self, make): self.make = make def … | |
Hi! I have used the os.walk function to traverse the many files in the directory. Now the problem is that it is listing same words from different files as different keys. How should I go about it? | |
Hello! I have designed a dialog with a grid widget. I would like to populate it with data from a MySQL table which has 10396 rows and 5 columns, as the grid widget. How can I do it? Then, how can I select a row from the grid widget and … | |
When realising the following operation: [CODE]do = 1.0 - 2.718281828**(-(23**2)/730) print do[/CODE] Python returns 0.632120558766 When you do it on the calculator or when google it, it returns 0.515509538 :-O | |
Hello! I have created a control using the TimeCtrl widget using this code to insert an hour in a 24h format using the HH:MM format [CODE]self.EndingHour = masked.TimeCtrl(panel, -1, name='24 hour control', format = 'HHMM', fmt24hr = True)[/CODE] However, it keeps showing the time as a 12h clock (in the … | |
Hi dears. I want make relation with gsm modem. my first goal and main one is sending and receiving sms. _then I want go front.for example for mms sending and ..._ I want to do it on a linux server. please introduce me a suitable modula with it's tutorial or … | |
The below code works, but the default value for the test method will be None. I'm trying to figure out how to read input from the user, convert that into a list (or whatever), and then based on the number of arguments the user inputs, it will be sent into … | |
Hey everyone, (Hopefully) a rather quick question. I'm currently trying to use regex to search a string for the location of the longest continuous match in a string where the *same* character keeps repeating. It doesn't matter which character it is, as long it is the highest number of consecutive … | |
Hey Guys I'm looking for a full time offshore Python programmer. It is for a gaming (casino) company that produce slot machines and electronic poker machines among many other. So in so many words it is not web based python, but I'm sure someone who is very good with web … | |
[CODE]def nod(n): c,i=0,0 while n>0: c=n%10 if c!=0: i=i+1 n=n//10 print(i)#prints the number of digits in the given integer 'n' [/CODE] how to make it able to count 'zeros'? | |
When I execute the following sql,select id from people, inside python and print the result, I get this: ((11L,), (12L,), (13L,), (14L,), (15L,), (16L,), (17L,), (18L,), (19L,), (20L,)) Why does python print L beside the numbers. Just to indicate Long type? | |
Hey guys, thanks a lot for the help. Here's the code I have for going through each file in a directory I specify: [CODE] for root, dirs, files in os.walk('%s'%(DOSEnvironVar)): for this_file in files: if this_file.find('.csv')>-1: filepath = os.path.join(root, this_file) currentfile=open(filepath,'r') filelines = currentfile.readlines() [/CODE] I would like to add … | |
Hey there everyone, I'm working in windows, writing a python program which runs various programs through command line and pipes the outputs of one into the next program. All the programs accept all instructions in one line then run. I've been using the os.system command to run these. One program … |
The End.