15,190 Topics
![]() | |
Hi guys, could you tell me how to solve this problem. This is what i've done. The result show : [9, 2, 6] [3, 9, 5] l1 = [4,9,2,6] l2 = [3,9,4,5] i = 0 j = 0 while(i < len(l1)): while(j < len(l2)): if(l1[i] == l2[j]): del(l1[i]) del(l2[j]) j … | |
Hi I got this error when I ran my scrip? import vidcap,time ImportError: No module named vidcap Where can I download the module? | |
![]() | So I am trying to make this code run in a constant loop. Any ideas how I would do this? As I said before I am trying to self teach myself Python and so far I have been successful. import os import datetime import time print('What would you like to … ![]() |
Hi, I need help if my Pseudocode is correctCreate and load an array with the following 7 values. Then add one more word (of your own choosing) to the array for a total of 8 words. This is a very basic programming class. We use Raptor lol biff comely fez … | |
![]() | So I am trying to self teach myself Python, and so far it is working great. However I have ran into a bump in the road and can't really figure out why this script isn't working... Any ideas? import os answer = raw_input('Ready for shutdown, continue?') if answer == raw_input('Yes'): … ![]() |
Hello , Let's say I have : def mine( a, b ): return a>=b - 1 I can't understand what's going on with the -1. So , if a = 4 , b = 2 , it gives True If the opposite it gives False. As I said I don't … | |
Hi I have an python script send me log files and ip address from my PC-B Is it posssible to add functins that I can Remote uninstall (distance)my script from my PC-B? if yes how? any idea? | |
char patron10(int m , int n ) char patron10(int m , int n ) { for ( int = 0 ; i < m ; i++) cout<< "." ; int a = 0 ; while (True) { cout<< 10*a ; if (10*a >= n) break ; for ( int i … | |
Hello, I'm a python beginner & I'm learning it on my own. So, I've few (dumb) questions about it. - Where should I host a python project on linux? I'm sure there'd be multiple choices. So, Where would you host it & on what circumstances? - I understand that `virtualenv` … | |
I just started to learn python few days ago. This is a small program I made to practise. print("Find Volumes of some Popular Solids") print("") names=['(1) Sphere','(2) Right Circular Cone','(3) Cylinder'] x=0 while x < 3: print(names[x]) x +=1 print('\n' + 'Enter the number of the solid, you want to … | |
Hello, First of all, I'm sorry if my question seems silly, but I am very unfamiliar with Python. I am using a particular python code base which, in a Linux system, solves the problem I am working on (I am using Windows). A major part of the python code's task … | |
Given Problem: A professor at Hardtack University has an unusual method of grading. The students may or may not all take the same number of tests. The individual tests are weighted, and these weights are used to compute the student's average. Important: the weights for all of the tests for … | |
how could i download a empty file from a website and see if the lines are the same as a diffrent file on my computer? | |
0 down vote favorite I'm using Wireshark packet analyzer & when I filter for all "Websocket" packets I see what I am sending /receiving to the host. When I check individual packets mine always show as [MASKED], but you can 'Umask Payload' which shows the data in clear text that … | |
Get difference of two text files in excel and highlighting the difference using python. eg. file1.txt alok|test1|test2|test3|test4 alok1|test2|aewer|262771|262772 Rest|t1|rang|banh|test Must|t1|rang|banh|test file2.txt alok|test11|test2|test3|test4 alok1|test2|aewer|262771|262772 Rest||rang|banh|test In excel the difference should be shouwn as below: file1.txt|alok||`test2`|test3|test4 file2.txt|alok|`test11`|test2|test3|test4 file1.txt|Rest|`t1`|rang|banh|test file2.txt|Rest||rang|banh|test `file1.txt`|`Must`|`t1`|`rang`|`banh`|`test` Basically if a record is present but with some field with different … | |
i want to convert my pdf files with ImageMagic python module PythonMagick but i havent found any solution on net. import PythonMagick im = PythonMagick.Image('files.pdf') im.write("file_img%d.png") i am using below code and it returns only first page of my pdf file. any help would be greatly appreciated | |
Hi I ran python script on my windows and I got this error below ,how can I fix it? I'm using python 2.7.3 from pyasn1.codec.der import decoder ImportError: No module named pyasn1.codec.der | |
I am creating a text editor on a Mac and am having trouble with file saving. I can open, save as and save files but the save function stops working after I call `self.close`. I get this error: Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line … | |
hello, Using Python 2.7, PyQt4, Qt Designer, and used pyuic4... I think thats it... windows 7? I have a GUI i created in Qt Designer. It has one button and one LCD number. I was trying to get the button to start and reset a timer, and have the elapsed … | |
I am trying to convert a file to a dictionary here is the contents of the file, Name: DragonMastur; Hand: None; Inventory: {"Gold": 0, "Brush": 0, "Twig": 0, "Sapling": 0, "Metal Axe": 0, "Grass": 0, "Metal Pickaxe": 0, "Metal": 0, "Log": 0, "Diamond": 0, "Stick": 0, "Stone": 0, "Wheat": 0, … | |
Hello. I was wondering if anyone could help me with a caesar cipher program I am attempting to create. I was asked to write a caesar cipher encoder program. Ok. No problem. This is what i got: [code] import string def main(): print "This program will encode your messages using … | |
Heya guys, i've been learning python for few weeks now and it's one of the best decisions i have made in my life so far..it's quite an interesting language and very helpful for beginners, i must say..now i tried to do some tickling with django and somehow managed to install … | |
I'm trying to run a python script from the cron but get the error "No module named requests" Traceback (most recent call last): File "testscript.py", line 2, in <module> import requests ImportError: No module named requests The script will run from the console but not through a cron job. I … | |
Hello , I can't understand why this loop doesn't work as I wanted. Why the continue statement isn't executed. I want the code to count **only** the user input which is 1 or 2 and stop when the sum is >=25. i = 0 user = input('Enter '1' or '2': … | |
I am trying to make a MS-DOS like program like python. I am adding a system to see if a command exists. the file "known.txt" contains: ['catfish', 'cls', 'dl', 'hello', 'help', 'help1', 'help2', 'info', 'logout', 'ping', 'run', 'stop', 'time'] This is the code i am using to run it: if … | |
i keep getting this error: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'F:/Term/cmdrun/new.log' how can i make the logging module stop loggin to new.log so it can be moved and renamed? | |
I am trying to work on some code that will fetch all hyperlinks from a webpage url using the python. The code works perfectly fine when i try to run the code at home network without my proxy. When i have to show the code to my teacher in my … | |
Hi All, I've just tried to get going with Django using MySQL, but linking them has been a nasty headache. I am using Python v3.5, Django v1.9 and MySQL 5.6. I've definately got MySQL/Python talking, but Django always has the problem: File "X:\Program Files\Python\lib\site-packages\django-1.9-py3.5.egg\django\db\backends\mysql\base.py", line 25, in <module> import MySQLdb … | |
Can someone please help me write a convertor for Hexidecimal to Decimal, has anyone found a way to allow for the entries to be able to be multiplied as integers, even if the input is a character and not a natural number. Thanks Jack | |
hi , I have two different versions of python on my ubuntu machine : 2.7 and 3.4 . my question is how to tell sys.executable to use python 3.4 ? this is what I get when I run the code : `>>> import sys >>> print sys.executable /usr/bin/python which is … |
The End.