« first day (773 days earlier)      last day (1415 days later) » 

2:28 AM
0
Q: Lo Shu Magic Square - checking for diagonals

BrianI am having difficulty with a Lo Shu Magic Square assignment. Here is what I have def magic(): a=[] for i in range(3): a.append([]) for j in range(3): a[i].append(input('enter values')) print a l1 = a[0][0]+a[1][0]+a[2][0] l2 = a[0][1]+a[1][1]+a[2][1] l3 = a[0][2]+a[1][2]+a[2][2]...

 
 
3 hours later…
5:20 AM
0
Q: How to find the algorithmic complexity of this program?

abhishek_MI have the following program which finds out all the prime factors of a given number. Algorithm: Divide by 2 until the number is odd, for each successful division add 2 to list of prime factors. Start from 3 with increment of 2 until the sqrt(A): while A is divisible by i, keep dividin...

 
 
6 hours later…
11:41 AM
0
Q: How to place image into a canvas in tkinter in python2

RoundDuckManI've tried to get this done, but I can't seem to find a way to program my way out of this. I'm pretty nooby at python programming, so help?

 
 
1 hour later…
12:59 PM
-1
Q: How to draw a moving trajectory using pylab

user223297I want to create a moving trajectory by plotting x and y. But I can not hold it in a single figure. I get many figures while on loop. Please help so that I can plot x,y values on same figure, and make it look like moving (by giving some delay between plotting points). import pylab x=[] y=[] n=0...

 
1:11 PM
0
Q: Why Variables in Python Are Different from Other Programming Languages?

Mahmud Muhammad NaguibAccording to my understanding, a variable in Python is: A name that refers to a value stored in the computer memory, and it's like a label on a box. but in other programming languages it is: A location in the memory where values are stores, and it's like a box. Why that difference? ...

 
 
2 hours later…
2:55 PM
0
Q: Making a multiplayer game using socketserver. Need help optimizing UDP server

Dysprosium DysprosiumI am making a multiplayer platforming game, and currently there are server performance issues once I have about 7+ clients connected. I was told earlier last week that I should investigate socketserver since previously I had been writing my own server using merely socket. Well, after 6 hours of ...

 
 
2 hours later…
4:42 PM
0
Q: Refactoring Code into a MVC Pattern under the Constraint of a Library God Object

noumenalI have 1000 LOC that I plan to refactor into different files and functions. The goal is to be able to test the business logic independently from the visual display. Hence, I am considering an MVC pattern. One of the challenges is that I repeatedly need access to (properties and methods of) a uni...

 
 
5 hours later…
9:49 PM
-1
Q: How can i reduce the time complexity of my algorithm?

JoeHow can i improve my code and reduce the time complexity I'm trying to first calculate if the movement of robot is possible in a row A robot can move in one step from cell X to cell Y if and only if the distance between the centers of the cells X and Y measured in meters is equal to the sum of...

 
10:01 PM
0
Q: Determining if the movement of a robot is possible in a row?

JoeA robot can move in one step from cell X to cell Y if and only if the distance between the centers of the cells X and Y measured in meters is equal to the sum of integers contained in X and Y. It then returns the index of the cell which the above condition does not meet which is the index only [0...

 

« first day (773 days earlier)      last day (1415 days later) »