15,190 Topics
![]() | |
Hi guys I need some help with a tic tac toe game I made, the problem[s] is that it will not display that there is a tie and when you win it will run the computer move function and then it will say you have won. It is something to … | |
Okay, I need to write a maze solver for the maze in the text file (yes it is an assignment). I am not asking for a direct answer, I just want someone to propose ways of solving the maze( I also have to mark the paths taken in the maze). … | |
Hi, I need some help getting the hypergeom distr. I've started with this code, but it doesn't seem work: [CODE]def logchoose(n, k): lgn = special.gammaln(n+1) lgk = special.gammaln(k+1) lgnk = special.gammaln(n-k+1) return lgn - (lgnk + lgk) def hypgeo(x, r, b, n): return exp(logchoose(r, x) + logchoose(b, n-x) - logchoose(r+b, … | |
Have a look at this...[QUOTE]>>> chores = 5 >>> paper_round = 30 >>> spending = 10 We’ve just created variables named ‘chores’, ‘paper round’ and ‘spending’. We can then re-type the equation to get: >>> print (chores + paper_round - spending) * 52 1300 16 CHAPTER 2. 8 MULTIPLIED BY … | |
Hello everyone, I'm new on wxPython programming I want to make an database with sqlite3, but I don't know how to make a database report with, just like an Microsoft Access Here's the code: [CODE]import wx import sqlite3 as lite class myframe(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, … | |
The title really says it all. For example if I had a music file and I wanted to have it play all the way through then how would I make it start another music file after the first is done? | |
Hello , i have two tables ,animal ,which has name,familie and weight and table food which has feed. I want to assure that every animal has at least one food. I did this : [CODE]import mysql.connector from database import login_info db=mysql.connector.Connect(**login_info) cursor=db.cursor() data=[('Geo','Elephant',['hay',peanuts']), ('Gerald','Gnu',['leaves','shoots']), ('Leo','Leopard',['meat']) ...................... ] for name,familie,feed in … | |
This will allow you to login a website with python. After logging in, you now have access to all the pages for "members only" accessed with python. Could be handy for a myspace update program, webcrawlers, facebook(not recommended, facebook doesn't like scripts), and other things. Some knowledge of HTML is … | |
Working on program to solve a predefined maze. I'm thinking the strings of spaces and #s should be arranged as strings or lists w/in a list, but not sure how to define spatial relationships so program can "move" through the maze. Just looking to help get started. | |
I'm fairly new to python and I've been working on this script for a week. I would like to get your input on my script and what improvements I can make to it. The way it works is by reading a file for backup times, which folders to backup and … | |
Hi. I am making a python program that automatically enters information into a form on a website. I looked at a module called mechanize at first but then I realized that it didn't support javascript. Is there any way to take a piece of information and insert it into a … | |
this is just a little project I'm working on for my converter I'll be asking for C++ to Py conversion since IDK C++ well enough to do it myself... but the project involves converting the current functions as well as writing opposite functions... (since the SDK only worries about writing … | |
Does anyone know how to duplicate the top of the 'Torre Agbar' building? I've been able to make the whole colom structure but the top code is bothering me Pls help; need it for my school assignment What I'e got so far : [CODE]from visual import* import math #gegeven straal= … | |
Hello Sorry about the stupidity of my question, I'm rather new to python. I'm writing a text analysation program. It reads from a text file and creates a list called 'line' which has variable length and is a list of words. I want to make a loop that will go … | |
Good day expert, am trying to direct user to a web page if login is okay in python but does not work [CODE] if username==okay and password == okay: # direct to success_page.py print "Location: success_page.py\r\n"; else: direct to errorpage.py [/CODE] the code does not work as the web page … | |
I've looked everywhere and I'm sorry if I'm missing the obvious, but I'm irritated out of my mind trying to find this solution. All I want to do is start an application with arguments in a new window (cmd.exe or linux terminal). I don't care about piping the data from … | |
Hi, I am new to python world ! Requirement is to automate plashing process. I need to run few ommand from command line (cmd) on window. - open cmd - execute command1 - execute command2 could you help me to develop script to automate this process ? Br, sbk | |
Following is the system and software info [b]Platforms: Windows XP and OSX Lion Activestate Python 2.7.2 wxPython2.9-osx-cocoa-py2.7 (for OSX) wxPython2.9-win32-py27 (for Windows XP)[/b] I am trying to create a UltimateListCtrl using ULC_VIRTUAL and ULC_REPORT mode. I would like to know how can I put a checkbox beside the first column … | |
Hi guys, I am fairly new to python. The problem I am having is manipulating the data that I read from a file. Example: if a line of the file is Monday = 0800, is it possible to break up that line so I can read Monday and 0800 separately … | |
i have two files containing lists and I would like to perform some manipulations with the numbers. file 1: [list] A 1 B 2 C 3 [/list] and file 2: [list] A 4 B 5 C 6 [/list] I have written the following code to read in the files and … | |
Hello everybody, I wrote a script as like below arr = [(line.rstrip('\n').split(';')) for line in open('C:/Config_Changer.csv')] import sys import fileinput for i, line in enumerate(fileinput.input('C:/1.cfg', inplace = 1)): for f,t in arr: if 'description' not in line: line = line.replace(f, t) sys.stdout.write(line) ok my problem is my config changer file … | |
Hi, Thank you for your help in advance, i am trying to create a dictionary, the code below works fine if I have two columns in each row with no spaces, however one of the columns data natively has spaces in it e.g. Sarah me hy uuuuu at the moment … | |
Hello friends In my window Tkinter there is 3 entries : actualpass , newpass , confirmnewpass . I just want to know how to do to check all entries one by one : if actualpass is empty : print "enter ur password" if actualpass is not empty and and newpass … | |
How can I use the "datetime" class to get a different time zone than mine? (for example gmt = 0 or utc+2) Thanks! | |
I was wondering if anyone has some good examples of running python functions and scripts within C++ using the Python C API. I can't seem to understand the ways of the Python C API, and was expecting something more similar to the Lua C API. The real question is "What … | |
In the following code : [COde]#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter import os import threading class Fil (threading.Thread): def __init__ (self): threading.Thread.__init__ (self) print "Init Fil" def f1 (self): print 'f1' #app().ecrit(1) class App(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) print "Init App" self.initialize() ping() def initialize(self): self.grid() self.bouton1L = Tkinter.Label(text="-", … | |
I'm making an RPG, and am trying to split things up into multiple files to organize things better. (I mean, character creation alone was over 2000 lines.) But this is something that I've never done, and I'm really not sure how to do it. So, if I could get some … | |
I'm trying to devise a program that attempts to solve the Collatz Conjecture, Wikipedia, but when I run it I get this error: [CODE] What value would you like to find if the collatz works for below?6 Traceback (most recent call last): File "/private/var/folders/fL/fL1lGxccGCypPBSIUXNGZGpkwIg/-Tmp-/Cleanup At Startup/Playground-345866896.786.py", line 27, in <module> … | |
Hey ppl im a student and i just started studying robot framework using python.Can anyone pls help me out with the submissions. It is really important for me. I just cant get the whole thing how much ever i try.I have come up with the following code for fibonacci series(given … | |
I want to create text files(empty) depending upon the user input, suppose if the user enter 20 , then it should create 1.txt,2.txt to 20.txt Assuming i want to create 2o files, then i wrote the foll code: [CODE] for i in range(20) filename="i.txt" fp=open('filename','w') fp.close() [/CODE] but i know … |
The End.