15,175 Topics
| |
I am very new to python and I just created a program: a = input('10x2= ') if a==20: print ('Correct!') if a!=20: print ('WRONG! Try again') a = input('10x2= ') if a==20: print ('Correct!') if a!=20: print ('WRONG! Try again') a = input('10x2= ') if a==20: print ('Correct!') if a!=20: … | |
[B][I][U]Introduction [/U][/I][/B] [COLOR="Red"]Hey everybody welcome to a tutorials on classes in PYTHON. The purpose I made this tutorial for is that when I was learning classes in python I dint found any good tutorials on Classes. Maybe I was wrong. But here's my tutorial.[/COLOR] [B][I][U]Layout[/U][/I][/B] In this tutorial i'll be … | |
I am trying to enter user name and password from command line. user name is 'example@gmail.com' and password is 'Example$319'.....When I am printing this values I can see the password is wrong. I am typing Example$319 but it is printing 'Example19'. $ and 3 are discarded.....Please help me what is … | |
Is there any way I can execute a block of code in a loop, like so: [ some code goes here ] Where the delimiters are "[" and "]", and also allowing for nested blocks, i.e.: [the user can create another loop[]] I am creating a parser for a language … | |
Hello guys, i hope everyone is doing good. I'm willing to learn Network Security and after reading a number of blogs i think python is one of the best language for that (correct me if i'm wrong). I'm not an experinced programmer so i need some help regarding what should … | |
def mu_cache(func,maxsize=128): "Most Used Cache decorator" cname = "__"+func.__name__+"_Cache" rname = "__"+func.__name__+"_Rankings" exec("global "+cname) exec(cname+" = {}") #here exec("global "+rname) exec(rname+" = {}") def wrap(*args,**kwargs): cache = eval(cname) rankings = eval(rname) try: res = cache[(args,kwargs)] except: res = func(*args,**kwargs) cache[(args,kwargs)] = res else: try: res = rname[(args,kwargs)] except: res=0 rname[(args,kwargs)] … | |
Hi, I was wondering how I could create a MUD (Multi-User-Dungeon) game using Python. It would be a dream come true if I could make one on my own so I was wondering if there is any reading material (pdf) that could teach me. What functions and commands would I … | |
Is it possible to make even a simple one? What about scanning files? | |
I was wondering if there was a way to use the values in a list one would create. Such as secrete_door = [1,2,3,4] print "Choose the right door and you may proceed." print "Guess a door 1 through 4." # I would like to pull a number from the list … | |
After reading the intresting articles of vegaseat, I finally decided to get my toes wet. So I installed Pyton 3.3.2 amd the plugin for Visual Studio 2010. The best learning is of course practice, so I started coding right away. Here is my first try: import sys print('Hello World') print('I … | |
Can anyone give this a try? '''print_error_python33.py there are times when a print() trailing newline disappears with Python 3.3.0 this does not happen with Python 3.2.3 or Python 2.7.3 ''' size = 180000 print("creating long string of %d sevens" % size) # create a long string of digits s2 = … | |
newbie question, but please i need help i just started learning gui programming on python, been getting this error on a code am writing concerning uising the get() method to read an integer from my entry box from Tkinter import * root=Tk() var=StringVar() label=Label(root, textvariable=var, relief=RAISED) var.set("converter") label.pack() L1=Label(text="x:") L1.pack(side= … | |
Which Is simple To learn Php with mysql or python with mysql ?? php or python with some other database...?? | |
I am new into the computer Science..I just completed reading and understing the C programming language..I think am quite decent in it..Now I want to start studying a new programming language this semester, before I start, I want to get some advice from the experts, should I choose Java or … | |
I want to start a program and pass arguments used by that program. How to do this using os.spawnl ? | |
i'm a programming beginner, and wanted an information for developing a soft from scratch. Pls. do assist me. Thanks | |
Hey what's up everyone? I have a script here that works when i execute it from command line, and when I double-click it. Now, there is something interesting going on here. 1) When the program is executed by process.start it does not load (even when called from cmd.exe /c ...) … | |
I have 2 classes in python and both of them extend the unittest.TestCase class. Hence I have 2 test cases. These test cases (classes) are: class Test_ID_94017(unittest.TestCase): ex = Excel() def setUp(self): self.driver = Browser().createBrowserDriver() self.driver.maximize_window() self.driver.implicitly_wait(15) self.ex.setUpASheetInExcel('Login') def test_CCPD_Regression001_PER_Custom_Check(self): ccp = CCPLogin(self.driver) loginDetails = self.ex.getLoginDetailsForATestCaseFromExcel('Login', '94017') ccp.login(loginDetails[0], loginDetails[1], loginDetails[2]) … | |
I am going through challanges in python and cant see why i'm not getting the correct answer... The challange is 'Find the sum of all the multiples of 3 or 5 below 1000.' Here is my code: #!/usr/local/bin/python2.7 a = 0 b = 0 eA = [] eA2 = [] … | |
So you want to find out which day of the week you were born. Well at least some of us do. I actually wrote this program because my whole family was born on Sundays, and my friends didn't believe it! An oldie but goodie, moved from DeSmet C to Turbo … | |
Hi. I want to learn penetration testing in python.but i am entirely clueless where to start. I have read about some famous tools like SCAPY and pycap.So,the thing is that i want to develop my own tools to comprimise a network.Are there any good tutorials on sapy or any other … | |
How do you rest your variable everytime your execute the program. [code]for x in range(1,100): running = True while running: guess = int(raw_input("Enter an integer:")) if guess == x: print "Nice" running = False if guess < x: print "Higher" running = True if guess > x: print "Lower" running … | |
Draw an inheritance hierarchy for classes Quadrilateral, TRapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the base class of the hierarchy. Make the hierarchy as deep as possible. | |
I'm creating my own handler, but what kind of object is request? I can just have the documentation for it and look at that, but I don't know where to. | |
I want to make a game somwhat akin in size and complexity to SNES Zelda. | |
Hi! I´m making a really big program of mail sending. However my last problem is the scrolling... The scroll bar don´t react to the mouse wheel and only functions when focusing in the bar , And that´s not user-friendly. how Can I achieve to make the scroll bar react with … | |
IMO, VS2010 with PythonTools 1.5 is the best IDE. it may not be as glamorous as Eclipse or PyScripter, but it certainly has more functionality and accuracy than either of them. -intellisense (PyScripter does a better job than Eclipse) -split file scrolling (not sure about PyScripter, but Eclipse doesn't have … | |
Ok, so I am trying to write a code that will find the attributes in a html tag using lists and splitting them up. Unfortunately its giving me a hard time with the added quotation marks. [CODE] def find_attribute_value(html_tag, att): '''Return the value of attribute att (a str) in the … | |
for example: consider the contents of file1.txt: 1 0 9227 1152 34 2 2 111 7622 1120 34 2 3 68486 710 1024 14 2 6 265065 3389 800 22 2 7 393152 48438 64 132 3 8 412251 46744 64 132 3 9 430593 50866 256 95 4 10 … |
The End.