15,175 Topics
| |
I'd really like to know the simplest way to implement music while people play the game I created, and for sounds to play during certain events. (such as dying) | |
The question is ask the user for 20 numbers one at a time, saves the numbers in list, and then printsa 2 column table with each number in the list entered in the first column and its square root in the second column. Each column should be 6 characters wide … | |
[COLOR="Red"]please i want help : i want rotate picture in (90) , (180) , (270) or any degress using this function ::[/COLOR] def rotating ( picture ,pict ) : # we have to pick to picture and then put them as parameter in th function : pic=makePicture(picture) canvas=makePicture( pict ) … | |
[COLOR="Red"]when i try to scail picture down (( i did not have any problem )) using :[/COLOR] def generalscailing (picture ,pict , n ) : # we have to pick to picture and then put them as parameter in th function : pic=makePicture( picture ) canvas=makePicture( pict ) SourceX=0 width … | |
Hi, Is there anyway I can get the scrollbar to display the last line of text always i.e the bar of the scrollbar should be dragged down by default ? I use Tkinter and Python 2.4 Thanks | |
hi i am new member here.. i want to open random url from list in python ..please help me to do that | |
Hi, I'm opening up text files created by another program which leaves an EOL character (which is a square box) to separate lines. I'm reading through these files and extracting data from them, I know where my data starts because I know the name of the parameter eg. "FOOD TYPE", … | |
Hello, The objective of my task is to allow the user to enter a series of colours (maximum and minimum of 4, and have to be within 5 set colours). I'm supposed to write code that continuously prompts the user if what they've entered doesn't meet the criteria. And also … | |
Hello everyone I'm using python 3.1 and am trying to use the pyserial library. However, when I try something like ser.write('hello'), I get a type error. [CODE]>>> import serial >>> ser = serial.Serial('COM13') >>> ser.write('a') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> ser.write('a') File "C:\Program Files\Python31\lib\site-packages\serial\serialwin32.py", … | |
Hello, I have been following discussions and codes for a while on Daniweb, and I'm really interested in this amazing community. I just joined though. I'm facing a problem in my Tk inter task. I have a code and I need to make a TKinter interface that does the job … | |
hello I have a problem concerning of changing mark. I don´t understand why it doesn´t work...thought the old_mark is type LIST. It works for one student and not for more (for loop) Pls can you help me? Thanks Vlady [CODE]def change_mark(changed_mark): for student in changed_mark: old_mark=changed_mark[student] position=old_mark.index[old_mark] old_mark[position] = raw_input('new_mark') … | |
Hi again, I have a program which opens a file, searches for a string ("Performance Summary"), misses 3 lines then copies the following lines until there are no more. [CODE]# Extracts data from a files and saves it in a summary file with open("file1.txt") as file: for line in file: … | |
Hi guys, I'm making a program which reads all files in a folder with test data, these files are known as logfiles. With each read logfile, I then need to extract only the lines which have the keyword in them... for example 'PASSED'. Here lies the problem, when you open … | |
So for my intro to programming class our final project is designing a simple game in Python. i picked Lingo but I'm running into a huge problem. Lingo is played by the computer picking a random 5 letter word (from a .txt file) then the user guessing 5 times until … | |
I want to build a script that does the following: The script should do make an arry from the directory where the script is with os.listdir(). Then the script has to test if the value in the array already excists in the outcome file, if not the name in the … | |
Hello, I have been working on learning Python and I have been writing a game(CLUI not GUI) that has gone through a few phases. It started out as a 3-4-5 variant assuming 3 rows with 3 objects in the first row, 4 in the second, and 5 in the third … | |
Hi guys, First post so please don't be too harsh :D. I'm trying to open a .txt file, search for a specific line starting with (" Performance Summary"), copying the first and third numbers in the columns of the 4th line below it and every line below that until there … | |
I need help with two things.... 1. I would like to lower the speed of the snake. 2. I want to make the screen, snake, and food bigger. I really need to change the speed. The 2nd thing is just something extra. But, I've tried a bunch of little things … | |
Hi. i am trying to create deck of cards for uno game. i need to create draw and undraw functions for each card class. i dont know how to do this.. Thanks ! | |
[B]Edit2: I realized the title of the thread was misleading after the post was made..it's more like There's 6 lines per student..I need to make a list for each student. So it's 6X..where X is the number of students.[/B] Hi all.. I have a text file that looks like so: … | |
I've created a game , somewhat like space invaders, and it looks pretty cool , very proud of what ive done. But I'm stuck on finding a way of unit testing the collision of 2 sprites and the collision between the borders and a sprite. If anyone could point me … | |
Hi, I need to concatanate lines based on regex. Lines to be concatanated are scattered. All lines begin with number$number$number$number$sentences. There is nothing to mark the end of sentence, only the beginning. Here is an example. I want to rewrite this one [CODE]2 $5$233$ check big cat if it have … | |
Hey so Im a beginner, and I need some help. My professor gave us this code: [CODE] def average(list): total = 0.0 for number in list: total += number return total / len(list) [/CODE] Then, he asked us to rewrite that program so that it uses a while loop instead. … | |
Hello currently I have started a project for my school. The project is a program that can factor a trinomial. So far I have it set up to take the users inputs. then it multiplies two of the inputs to get a new number. My problem is that i need … | |
Hey so Im a beginner, and I need some help. My professor gave us this code: def average(list): total = 0.0 for number in list: total += number return total / len(list) Then, he asked us to rewrite that program so that it uses a while loop instead. So far … | |
Hi Everyone, I am trying to call a function after every T secs . When i use time.wait() , the app hangs, i do not have control over the app. For now , this programs will do the process once , and then after T secs . But i do … | |
I seem to be having a problem importing functions from a file whenever I use the wildcard "*". [code]from text import *[/code] Raises this error: NameError: global name '_Star' is not defined However, if I ask it to import the Function names' manually like so: [code]from text import _Star, _Zero, … | |
Hi everyone i'm very new to python , only have been working with it for about a week, and I have the following question.I'm making a Lingo game in which you guess a needed word, but the first letter is always given when started I have 3 lists in which … | |
I need to insert some rows into Excel. I know it can be done via xlApp.ActiveWorkbook.ActiveSheet.Rows("10:10").Insert() But what I need to know, is if I can use variables in place of the 10's. I need to insert rows at various places throughout an excel document, and input data into those … | |
How would you write this program in Python IDLE? Write a program with a function that accepts a string as an argument and returns (some type of return value) a copy of the string with the first character of each sentence capitalized. For instance, if the argument is "hello. my … |
The End.