- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
11 Posted Topics
Hi. Before I start I'll just let you know that this isn't for school, I'm just doing python as a hobby which I have pretty much taught my self. I'm working on a project, it is the "cheat!" card game written in python, currently CLI but when it is bug-free … | |
Re: First of all, python doesn't use arrays, what you're referring to is called list. You should go with the option that produces the cleanest code. I'm not really sure because you haven't given much information, I'd need to see the whole module to give you an opinion. But if the … | |
Re: This maybe?: [code=python] print("First Line") input() print() # Blank line 1 input() print() # Blank line 2 input() print() # Blank line 3 input() print("Second Line") [/code] Each input() just waits for you to press enter before continuing. [QUOTE]Are you using the Python Shell (>>> prompts), or an editor like … | |
Re: [QUOTE=Jintu;895441]Hi, this is the new code I tried, but it still does not work, any suggestions? max_number = -1 min_number = 100000000 list = 0 numbers = (input("Enter a list of numbers, (Enter -1 to stop): ")) numbers = int (numbers) while numbers != -1: total = numbers + max_number … | |
Re: [code=python] def flipcoin(times) from random import randint start = input("Press enter to start flipping") heads, tails = 0, 0 for i in range(times): if randint(0, 1) == 1: heads += 1 else: tails += 1 print("Heads:", heads, " Tails:", tails) if heads > tails: print("Heads won!") elif heads == tails: … | |
I've nearly finished my python project, and plan to maybe distribute it. But I don't want users to have to go to command prompt and type python foo.py. I don't mind having the user install python, but is there a way I can make an exe that just runs the … | |
Re: Not really that important, but just so you know: [icode]if is_prime(i) == True:[/icode], the "== True" is redundant there since it already returns a boolean. Change it to [icode]if is_prime(i):[/icode]. | |
Re: I got 67%... This is too common to be a coincidence, how does everyone get 67? I'm going to try it again and see if I get 67 again. | |
Ok, so I have a project that I've written in Python(Actually it's not done yet), its the card game "Cheat" that you play in the command prompt with (until I learn wxPython -- GUI for Python) with computer players (or other people with you). I want to distribute it later, … | |
Re: maybe first make an array of 5 elements (to store the 5 greatest) then loop with the iterating int going from 0 to 4, here is how I would do it: [code=c] int[3][5] myArr = { {23445, 2144, 77988, 545, 52358}, {2356, 7878, 531, 78, 78090}, {578689, 90877, 1345, 422, … | |
Re: Did he change his sig as of creating this thread? Because right now its ".....Hi?" which doesn't make much sense with the things that have been posted... |
The End.