15,185 Topics

Member Avatar for
Member Avatar for nwillis1

I have a computer science project and it has all to do with list and such could someone please help me with it!

Member Avatar for nwillis1
-1
95
Member Avatar for MasterHacker110

I've been messign around with Python a little recently. Though I now want to import one of my .py files into my "main" file, but I get an `"module" object is not callable` error. How do I actually do this then. My files: KeyGenerator.py main.py Code I use to import: …

Member Avatar for MasterHacker110
0
340
Member Avatar for YorkshireSpud

Im personally learning how to program in python though I do know of other languages. Is Python the best to learn off?

Member Avatar for vegaseat
0
278
Member Avatar for kruko

Hello Guys, i am new to python, for a assingment i need to create a game (binary puzzle). im having problems to start with creating the bord, i saw some examples of creating a bord game on this forum but it didnt worked out for me. i want to create …

Member Avatar for Gribouillis
0
531
Member Avatar for vegaseat

This snippet shows you how to animate a dice roll with the Tkinter GUI, useful for many games that require a dice to give a random number from 1 to 6. An interesting use of Tkinter's grid(), grid_forget() and after() functions.

Member Avatar for Jake_6
0
4K
Member Avatar for punna.udaykumar

A series of different parts of sentences will be randomly put together to come up with new interesting sentences. using with Random, Integers, Print, Strings, Breaks, Functions, For, Range

Member Avatar for sneekula
0
484
Member Avatar for ao_py

I am trying to write a program that graphically presents three doors and ask the user to choose the “special” door (randomly selected by the program). If the user correctly chooses the special door, it’s a win. If either of the other two non-special doors is selected, it’s a loss. …

Member Avatar for sneekula
0
890
Member Avatar for dancks

I was testing this in prompt mode: import re def checkurl(url): check = re.match(r'^(:?https?://)?[^\/#?&]+\.[^\/#?&]+.*$',url) if check == None: print “NNOOOOOO!!!!” else: print “YESSSS!!!!!” checkurl("javascript:void(0);") checkurl("/account/general?ru=https%3a%2f%2fwww.bing.com%3a443%2fsearch%3fq%3dukraine%2bcrisis&FORM=SEFD") checkurl("/?FORM=Z9FD1") checkurl("http://choice.microsoft.com") I have no idea why this won't work. Ignore the regex its only supposed to weed out relative paths and fragments of strings. …

Member Avatar for Gribouillis
0
993
Member Avatar for Rahul47

Hello folks, I am currently in 2nd year of Masters Degree and I am expected to develop a project this year from the given topics. I find Command Based text editor like vi fascinating as others were boring. So, here is the project definition. **In this project you are expected …

0
60
Member Avatar for Johnny Blaz
Member Avatar for Florian_2

Hey, guys! Newbie here. =) I try to reverse an image but an error came and i don't know why :/ This is the error: Traceback (most recent call last): File "C:/Users/Florian/Documents/ISN/S10/défi11.py", line 10, in <module> im.putpixel((x,600-y),(p[0],p[1],p[2])) File "C:\Python27\lib\site-packages\PIL\Image.py", line 1267, in putpixel return self.im.putpixel(xy, value) IndexError: image index out …

Member Avatar for vegaseat
0
782
Member Avatar for James_41

I have to complete a project which have an text file and finds path between 2 actors(kevin bacin game) that you input by going through the movies in the text file. For example if the text file is: Apollo13 Kevin Bacon Tom Hanks Gary sinise HollowMan Elisabeth Shue Kevin Bacon …

Member Avatar for juanpa_2510
0
3K
Member Avatar for fontana74

Hi guys, I'm trying to draw multiple diagonal lines in python, I know I have to use a loop but how do I get the lines to draw in different places? i.e \\\\\ \\\\\

0
72
Member Avatar for prasanna.k

Hi Guys, I need python script to assign 100 IP addresses to VMs present in the same ESX host. can anyone help me with this.

Member Avatar for Gribouillis
0
870
Member Avatar for JJHT7439

I have to complete a lab which basically takes a text file and finds path between 2 actors that you input by going through the movies in the text file. (For the labs purposes we are only doing 3 degrees of separation) For example if the text file is: [QUOTE]Apollo13 …

Member Avatar for James_41
0
3K
Member Avatar for TyeL89

I am creating a contact program with python and wxpython. While creating the browsing function for my program I ran into a problem. I've been searching for hours trying to find a way to fix it. Unfortunately I haven't had any luck on fixing the error/problem. Here is the code …

0
167
Member Avatar for Noskes

Hi, I'm currently trying to create a Pattern on python which I'm really struggling to figure out. I'm trying to recreate the patch in the picture I've uploaded however I can't figure out where I'm going wrong. I'm really confused and I'd really appreciate it if someone could help me. …

0
75
Member Avatar for piovertwo

This is for a senior-year project with an [ANFIS](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=256541) (adaptive neuro-fuzzy inference system) module to be used as a predictor for financial instruments. The bulk of the system will be written in Python—chosen for its ease of use and the presence of libraries for genetic programming, another component of the …

Member Avatar for Gribouillis
0
3K
Member Avatar for Alex_29

Hi, I've just started using Python/Pygame as a hobby. I've gotten the code to draw my Plane.png and move it using the wsad keys, and I mapped the q and e keys to rotate it which it does, but each time it rotates, it 'falls' down the screen to the …

Member Avatar for juanpa_2510
0
4K
Member Avatar for Karthika_g

Hello, Please let me know how should we get the id of an entity and put it in the another entity. I have two entity User and Track. I tried the below code I couldn't make. Please help! class Review(webapp2.RequestHandler): template = JE.get_template('templates/Review.html') self.response.out.write(template.render()) def post(self): n = self.request.get('user_name') t …

0
204
Member Avatar for Auroch

Hello! I'm trying to transform working Python code to Matlab code. It's Simpson's rule. But MatLab code is not working. What should I change for in this code? Python: from math import sin def f(x): return ((0.6369)*sin(sin(x))*sin(x)) def method_simpson_compost(f,a,b,n): h = (float(b)-a)/n i = 0 fks = 0.0 while i<=n: …

Member Avatar for Taywin
0
317
Member Avatar for herrschteiner

I'm writing a bash script that redirects the output of a command to a file. The next thing the script should do is read the contents of the file, into the tenth line of a python script. It's tricky, because the line of text in the python script should read: …

Member Avatar for Software guy
0
306
Member Avatar for Kadian

he following code gives the error UnboundLocalError: local variable 'currentpl' referenced before assignment: if user_choice == 0: currentpl = 1 elif user_choice == 1: currentpl = 2 while gameover(num_sq): if currentpl == 1: pick = getPlayerPick(num_sq) while not validPlay(pick, num_sq): pick = getPlayerPick(num_sq) makePlay(pick, player_col[currentpl]) if currentpl == 2: pick …

Member Avatar for snippsat
0
370
Member Avatar for photoguy77

teacher assigned out of the book "python programming: an introduction to computer science. second edition. page 384 # 19 is as follows this below is verbatim from the book and the instructions for the assignment are "Python Assignment #10 Complete programming exercise #19 on page 384 from Chapter 11" create …

Member Avatar for chriswelborn
0
366
Member Avatar for ncassambai

Hi so basically I need to create a timer for this simple maths test. I need it to give each question, lets say 30 seconds for test purposes, and then move onto the next question after the time is up and repeat the timer like that. Just cant figure it …

Member Avatar for woooee
0
141
Member Avatar for rogwar

Hi everyone. I have question and i hope someone will be pleased to help me. I am trying to write a python script which can extract data from a file (Iter.dat) and then put data in a tableau like the out.dat file. Here is what i wrote: f = open('Iter.dat', …

Member Avatar for rogwar
0
261
Member Avatar for sneekula

Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names.

1
5K
Member Avatar for mcroni

hi, have already written a GUI program on a different Pc, i copied the py file unto a new pc to continue with the building,i have installed all the necessary modules but it gives an error when i run it. Traceback (most recent call last): File "C:\Python34\aaaa.py", line 2, in …

Member Avatar for Gribouillis
0
337
Member Avatar for mark103

Hi all I have got a problem with the list of strings. I have got the full list of strings, but I can't be able to print for each string which I can only print for the full string. When I use this: programList = list() # set the channels …

Member Avatar for Gribouillis
0
273
Member Avatar for david.nicely.393

Need help with writing an algorithm: Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. For each …

Member Avatar for sneekula
0
133

The End.