15,190 Topics

Member Avatar for
Member Avatar for sikais17

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 …

Member Avatar for sikais17
0
153
Member Avatar for Rocanlover1

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 …

Member Avatar for TrustyTony
0
144
Member Avatar for a007s

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__ …

Member Avatar for a007s
0
3K
Member Avatar for UaBoy

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 …

Member Avatar for vegaseat
0
266
Member Avatar for guyfrompluto

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.

Member Avatar for Beat_Slayer
0
703
Member Avatar for lewashby

[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 = …

Member Avatar for Beat_Slayer
0
209
Member Avatar for gunneronaspooky

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 …

Member Avatar for gunneronaspooky
0
131
Member Avatar for Peter_TARAS

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. …

Member Avatar for Peter_TARAS
0
11K
Member Avatar for BigHappyGod

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 …

Member Avatar for Beat_Slayer
0
494
Member Avatar for Delu:sional

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') …

Member Avatar for Delu:sional
0
147
Member Avatar for UaBoy

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 …

Member Avatar for UaBoy
0
124
Member Avatar for remomore
Member Avatar for kumarantechie

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 …

Member Avatar for deimusmeister
0
153
Member Avatar for GothLolita

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 …

Member Avatar for techie1991
0
2K
Member Avatar for gsenthil25

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 …

0
28
Member Avatar for lionaneesh

[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. …

Member Avatar for redyugi
1
3K
Member Avatar for ultimatebuster

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.

0
105
Member Avatar for Ghostenshell

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 …

Member Avatar for Ghostenshell
0
102
Member Avatar for udev

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?

Member Avatar for udev
0
126
Member Avatar for acrocephalus

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 …

Member Avatar for acrocephalus
-1
2K
Member Avatar for Hawkeye Python

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

Member Avatar for vegaseat
0
272
Member Avatar for acrocephalus

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 …

Member Avatar for acrocephalus
-1
194
Member Avatar for funfullson

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 …

Member Avatar for nazza
0
192
Member Avatar for jerryolive

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 …

0
27
Member Avatar for sphynx_25

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 …

Member Avatar for sphynx_25
0
2K
Member Avatar for Offshorejob

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 …

0
31
Member Avatar for D33wakar

[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'?

Member Avatar for Beat_Slayer
0
141
Member Avatar for jobs

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?

Member Avatar for timogoosen
0
3K
Member Avatar for PythonNewbie2

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 …

Member Avatar for Reverend Jim
0
287
Member Avatar for sphynx_25

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 …

Member Avatar for sphynx_25
0
234

The End.