- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 16
- Posts with Upvotes
- 9
- Upvoting Members
- 14
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
Is it possible to write a full blown operating system (such as Linux) in Python? I mean writing a kernal, and then other applications that the kernal calls, without having Windows, Linux, UNIX, or Macintosh OS installed on your computer? |
|
Okay, I'm trying to make a python game (not with pygame), I want it to use the arrow keys. But the thing is, I don't know how to get it to respond to the arrow keys. So here's what I want to do. If the user presses the up arrow … |
|
!USING PYTHON 3.1! Hello DaniWeb! Today I'm going to teach you a cool variable trick that I learned. So here's an example: [CODE] a, b, c = input('?x?x?: ').split('x') [/CODE] Now let's input something like: [CODE] >>> a, b, c = input('?x?x?: ').split('x') ?x?x?: 1x2x3 [/CODE] Now, variable 'a' is … |
|
Re:
There is a security technique known as code signing. It basically generates a certificate for your code. This certificate first certifies the author of the code. Second, it has a value generated from the code. This value is unique to that code. If any changes are made to the code, … |
|
[B]!USING PYTHON 3.1![/B] Hello DaniWeb! Today I'm going to be posting a [B]simple[/B] threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a … |
|
I've been at a loss as how to convert the std::string to char (Line 40). I've tried c_str() and a few other things, but it's really confusing when the pointers are thrown in there. I know I'm kind of asking you guys to do it but I don't know what … |
|
Hey! I've recently come back to C++ to tackle another project, but I've run into a problem I can't figure out. #include <iostream> #include <string> #include <fstream> #include <direct.h> using namespace std; int main() { string variable = "AwesomeName"; mkdir ("test"); ofstream write ("test\\" (variable+".txt").c_str() ); // this the place … |
|
Re:
Hello everyone! I am taking a python course at my college and I have recieved a question for my homework that I am having trouble with. [I]14) Write a program that finds the average of a series of numbers entered by the user. As in the previous problem, the program … |
|
[B]!USING PYTHON 3.1![/B] [B]USING WINDOWS[/B] I never thought it could be so simple. However I should have clarified that it's a [B]1 character[/B] input. But the general idea is the same. Someone suggested that I explain what is going on better, so I'm going to do that. The function 'getch()' … |
|
Is their ANY way to do something like: [code] for (int x=1; x<3; x++) {string MyArray[1][x]={"-"};} [/code] Assuming the array has already been defined? I really don't want to have to do: [code] MyArray[1]={blah} MyArray[2]={blah} MyArray[3]={blah} etcetera etcetera [/code] I'm not necessarily looking for efficiency but seriously, initializing 50 arrays … |
|
Re:
Suppose your $1,000 is earning interest at 4% per year. How many years you need to double your money? Write a program to calculate the number of years! |
|
I'm creating a program and I need the class 'Child' in the following code to inherit the value of 'age' from the class 'Mother'. [CODE] #include <iostream> using namespace std; class Mother { public: int TellAge(void); protected: int age; } MObj; class Child:protected Mother { public: void ChildTellAge(void); } CObj; … |
|
Re:
Can anyone suggest me some nice string tutorials because I found few of them but they seem pretty hard to learn (like one on [URL="http://www.cplusplus.com/reference/string/string/"]http://www.cplusplus.com/reference/string/string/[/URL] ) It should be native C++ string library because that is the one I started learning, So I would appreciate any suggestions... thanks |
|
Re:
I have to create this C++ program for a class could someone please explain this more in detail for me Create a new C++ workspace called incomeTax. Construct a C++ program with a function called incomeTax which computes the tax due using the gross income and itemized deduction. • The … |
|
Re:
Hi All, I was working on the project that was building very well on Visual Studio 2008 Express Edition. Later I have installed the Visual Studio 2008 professional along with Visual Studio 2008 SP1. Now I am trying to build the project, which shows the following Error. fatal error LNK1181: … |
|
Hey, I'm new to C++ (1 week, used to do Python), and it's very enjoyable, but I have an issue. In the following code: [CODE] int sizeofarray; cout << "Type size of array: "; cin >> sizeofarray; int myarray[sizeofarray]; ...........more code [/CODE] That isn't the code, but that is the … |
|
Hey, it's me again. I have a Ceaser Cypher here: [CODE]letters=list("abcdefghijklmnopqrstuvwxyz") def Encrypt(): for i in range(int((len(word)-1))): curletter="".join(letters).find(word[i]) if (curletter+key)>(25): if (curletter+key)<0: i=(curletter+key) i=[(curletter+key)-(curletter+key)] else: i=(curletter+key)-(25) print (curletter+key) word[i]=letters[curletter+key] return def Decrypt(): return word=list(input("Type in some letters:")) key=int(input("Type in a key:")) choice=int(input("1) Encrypt\n2) Decrypt\n:")) if choice==1: Encrypt() else: Decrypt() print("".join(word))[/CODE] … |
|
Re:
I don't understand the documentation |
|
Re:
Hi I am relatively new to Python so forgive me if I have missed an elephant in the room so to speak. My code has worked for the whole day, but this afternoon I have begun receiving the error [CODE]Traceback (most recent call last): File "C:\Documents and Settings\King Alex\My Documents\Summer … |
|
Re:
How do I access windows environment variables using Python? eg. if I have the following: set junk=C:\temp\junk how do I access 'junk' from python? |
|
Re:
How can I make windows execute a python script when a flash drive is plugged into the computer? Is there a way to do this with python or do I have to use windows? |
|
I have a limit of 30-45 dollars to buy an editor (with Python support, obviously) . Here's what I would like. Customizable syntax highlighting (like the kind in Notepad++). Auto indent, so it autmatically indents 4 spaces after a ':' character. Good code completetion. A built in IDE. Preferably like … |
|
Re:
Hi there! I new learner in Python. And just couldn't get threading. I wrote this script. [CODE] import sys import MySQLdb if len(sys.argv)!=3: """the program name, mac and ip makes three""" """stop program and send error""" sys.exit("Must provide mac and ip!") mac = sys.argv[1] ip = sys.argv[2] print 'Connected to … |
|
Re:
I'm writing some basic programs on python and I need an IDE with advanced code completion(like bpython). I've tried eric, eclipse, IDLE but those are not good at code completion, I need something like bpython(if you don't know, just try, it's great at code completion and hints) |
|
Re:
hello, me again. When ever I try to add pictures it WONT LET ME ADD THEM. i download them, type all the code, and no image shows up at all. Can someone tell me how to correctly do it. do i have to define the code that imports pictures? |
|
Well, I've written a simple program that gives you info about your computer. The program runs perfectly fine, but the console window pops up and really does nothing. So I would like to hide the console window and only show the gui frame. Pointers on how to do this? |
|
Re:
hello, i'm new to this website and well only have a few months of python exp. i decided to make a small, simple rather easy if HUMOR game. When is started, i did not know a whole lot other than how to make lists and scenes and make a way … |
|
Re:
I'm just wondering what do I have to add to the code [code] print "Hello World" [/code] to output H e l l o W o r l d like there's spaces in between each letter? Thanks. |
|
Re:
I know Remembering secure passwords is difficult. So I made this. [code] import random, os a= ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','{',':','>','?','}','|','!','@','#','$','%','^','&','*','(',')','-','+'] z = int(raw_input("How many words in your password?: ")) os.system("clear") List = [] for x in xrange(z): List.append(random.choice(a)) print "".join(List) print "1) Yes" print "2) No" b = int(raw_input("Would you like to save … |
|
Okay, the encryption algorithm idea was stupid. But I still made an encryption program. I got the absolute most possible frustrating situation. The program doesn't work in the console window. It spits out a giant error (probably recursion judging how many errors it got), but it DOES work in IDLE. … |