14,946 Topics

Member Avatar for
Member Avatar for Naley2010

hi i need help to write two different functions the first one is to displaysquareroots that asks the user for a number n, and displays the square roots of the number from 1 to n and to 3dp so if the user enters 3 it displays the square root of …

Member Avatar for richieking
0
149
Member Avatar for DanniStacey

Hi, I have been ask to do this: Write a function wallOfEyes that takes three parameters (radius, width and height) and displays, in a window of exactly the right size, a “wall” of brown eyes of the given radius and dimensions. E.g., the function call wallOfEyes(50, 4, 2) should give …

Member Avatar for richieking
0
84
Member Avatar for bob24bob

I have recently made a guessing game code and I am now trying to make it so when you enter a number above 3, it will give a print command that i will write. I don't need help on the print command, I just need to know what the string …

Member Avatar for TrustyTony
0
163
Member Avatar for Finki

So im putting together a program that decompositions numbers on prefactors. Example: 252=2^2 3^2 7^1 and 1944=2^3 3^5 Put this into tuples: (wont use split, just for example) >>> split(252) [(2, 2), (3, 2), (7, 1)] >>> split(1944) [(2, 3), (3, 5)] This is the code that determines whether a …

Member Avatar for Finki
0
202
Member Avatar for flamedragon00

Hello everyone, I'm new to this website and to prgramming in general. Taking a class and we're starting with python. Doin a programming project in which I need to do Data mining for a company. I'm stuck trying to get the company's monthly average for each month. I can A …

Member Avatar for flamedragon00
0
1K
Member Avatar for Azul-P

Greetings, I'm working my way through Michael Dawson's Python Programming for the Absolute Beginner book. At the end of chapter 4: "for Loops, Strings and Tuples", there is a challenge that asks so "improve Word Jumble so that each word is paired with a hint. The player should be able …

Member Avatar for TrustyTony
0
2K
Member Avatar for Andrew1988

Hi there, I am in a first year programming class at Dalhousie University (Halifax, Nova Socita, Canada), and I need a little help with an assignment. The exercise is as follows: "[10 Points] Create a number guessing game. First, ask the user for some positive integer, n. Ask the user …

Member Avatar for woooee
0
191
Member Avatar for kuchi

Hi, I have a date with the String like "20091128' and we have to check this date with current date ("20101118"). if that date is old then we need to do some rules. I've checked in google whether there any existance but there have different formats. Can anyone give me …

Member Avatar for Gribouillis
0
78
Member Avatar for davidgulliaf

Hi, im newish to python and have been stuck on this coding for a few days I have managed to code so I take input from user of a string which I then list the string depending on how many strings are entered after a space so if the input …

Member Avatar for woooee
0
119
Member Avatar for bwbyron

This is basically what I have. I've commented out all the places where I know what to do, but not how to do it. PEG_HOLE = 10 PEGGED = "X" ##################### # Functions you need to fill out def roll_die(): # This function will simulate rolling two six sided dice …

Member Avatar for TrustyTony
0
210
Member Avatar for Kagome

I'm writing a program for a class that's a game. It has ten places to put a peg, numbered 1-10. You have to roll 2 die and the summation is the number you have to work with to try and fill in the board. So far, my program is as …

Member Avatar for TrustyTony
0
242
Member Avatar for fannunziata1

I need help converting this problem into a python program. I've been at it for days and its due tomorrow. Someone please help! In a locker room there are 1,000 lockers in a row numbered from 1 to 1,000. They are all closed. A monkey comes in and starting at …

Member Avatar for TrustyTony
0
153
Member Avatar for maofree

Hi Droopy doesn't work on my Linux's distro with python 3.1 (with python 2.x everything was ok). (here you can find droopy [url]http://stackp.online.fr/?p=28[/url]) I've used this command 2to3 -w droopy and changed alot u" in " , in Translations section But now there is another problem [CODE] Traceback (most recent …

Member Avatar for maofree
0
374
Member Avatar for gunbuster363

I just started to learn gui with wxpython I can see many objects have a style attribute, for example TextCtrl, self.inputArea = wx.TextCtrl(self.background, style=wx.TE_PROCESS_ENTER) Where can I see a list of available style for each object? Thanks

Member Avatar for cghtkh
0
103
Member Avatar for gk123987

Hi all, I am in the process of automating functional tests. I have the following requirement. 1. The python script should invoke the Lauterbach automatically 2. The cmm file mentioned in the python script, should be loaded in to the Lauterbach automatically. Is there any commands to do it? Please …

0
53
Member Avatar for gunbuster363

Hi all, I am having problem printing chinese character in a text file. Some point to know: 1. I do not know the codec of the text file, but I know it is writting in traditional chinese. 2. I tried some approach from google, no one work I don't remember …

Member Avatar for richieking
0
96
Member Avatar for hyperzero4

[code]> can't invoke "event" command: application has been destroyed while executing "event generate $w <<ThemeChanged>>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged"[/code] Has anyone ever seen this error before? It keeps appearing when I load a toolkit I need for my project. I've been working to find out where …

Member Avatar for creed_creed
0
767
Member Avatar for victordq

Hi guys, I'm new to forum and to Python. I need some help with the python - MySQL interaction. I'm creating a program for my conclusion project in College and it's not working. I gotta present it on Wed, 11/24, and I'm really desperate for some help. It's suposed to …

Member Avatar for victordq
0
198
Member Avatar for convoluted

Hey all, Hopefully this will help someone with a problem I encountered. For a few days now I was looking for a way to concisely set the attributes to numerous controls without duplicating attribute code again and again. For example, let's say I have 3 static text controls and I …

Member Avatar for convoluted
0
175
Member Avatar for evertron

I created 2 classes and I need to pass Name, Dept., Birthdate and HireDate from the Employee class to the Date class. I get the month date and year from input prompts. The problem I have is how to get those dates for the employee passed into the date class. …

Member Avatar for slate
0
135
Member Avatar for spiricn

So I've been writing this application that works with files , and I wanted to add a list of recently opened files in the "File" menu and I came across a weird bug .. Here's the sample code .. [code] for path in recentFilesList: item = wx.MenuItem(menu, wx.NewId(), path) self.Bind(wx.EVT_MENU, …

Member Avatar for loading...
0
182
Member Avatar for sallubhai

Hi, How can I print this figure if I have an array like this? It should be a for-loop but don´t know how. [CODE] labyrinth = \ [[0,0,0,0,0,0,1,0], [0,1,0,1,1,1,1,0], [0,1,1,1,0,1,0,0], [0,1,0,0,0,0,0,0], [0,1,1,0,1,1,1,0], [0,0,1,1,1,0,0,0], [0,1,1,0,1,1,1,0], [0,1,0,0,0,0,0,0]] [/CODE] figure: ############. ## ## ##. . . . ## ##. . . ## #### …

Member Avatar for TrustyTony
0
139
Member Avatar for Binika

Please help! I need to write a programe, that would draw a picture like this: [URL="http://yfrog.com/6ptreelj"]http://yfrog.com/6ptreelj[/URL] I've tried with recoursion but it doesn't work properly. from turtle import * [CODE]tree(n, lenght): if n == 0: lt(90) fd(lenght) rt(45) fd(lenght/2) bk(lenght/2) lt(90) fd(lenght/2) bk(lenght/2) rt(45) else: rt(135) tree(n-1, lenght/2)[/CODE]

Member Avatar for ultimatebuster
0
160
Member Avatar for ekkanh

Hi How can I delete a file after a certain time? for example if I want to delete a file after 08.30 has passed? do I use import OS? and import time?

Member Avatar for richieking
0
375
Member Avatar for stack111

I have no clue how to start this Use the for and while iterative structures within Python to program a loop that generates a list of odd numbers from 1 to 33 inclusive. (two sets of code here!)

Member Avatar for richieking
-1
173
Member Avatar for gunbuster363

python.org tell people to forget about python 2 and head into python 3, but many 3rd party module do not support python 3 at all. For example, python 3 only ship with a tkinter gui module which does not have great reputation. If I am to use python 3, I …

Member Avatar for richieking
0
211
Member Avatar for Mollier

Hi, this is my first post here at Daniweb. Seems like an active and friendly environment. I have very limited experience with programming in general, and even more so with GUI programming. As the title suggests, I want to stop a while loop by the use of buttons. When I …

Member Avatar for richieking
0
2K
Member Avatar for amandureja

Hey guys! This is my very first post on this website. Anyways, I just started learning Python, and am reading an ebook, called "A Byte Of Python". So at the end, it says to create an address book application. In my application, it basically just creates a text file with …

Member Avatar for richieking
0
2K
Member Avatar for MarleyM

Hey DW. I'm trying to figure out a way so my TCP Server and client can seamlessly send messages back and forth without having to take turns sending the message. Python isn't my language of choice but it's the one i have to use for this assessment. I'm also using …

Member Avatar for convoluted
0
176
Member Avatar for gunbuster363

I've learn python and I won't say that I know it all, but I won't see anywhere except google will use python. New programming language like python and ruby, do they have space to grow?

Member Avatar for convoluted
0
304

The End.