Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
9 votes
2 answers
333 views

Simulating surname convergence in a population

I was curious a few weeks ago about how surnames come and go (mostly on the go). I wanted to know how quickly surnames die out, because (in my simplified simulation world) once the last person with a ...
Drise's user avatar
  • 255
8 votes
2 answers
3k views

Print a random anagram of a given string

I am given a task to create a function that prints a random anagram of a given string: ...
Latika Agarwal's user avatar
5 votes
3 answers
1k views

WV lottery tool in Python

I am self taught in python. I love to play the lottery and play with numbers. I put this program together as a hobby to learn python and build something that people can use. I used and reused code ...
Danny's user avatar
  • 51
15 votes
3 answers
946 views

My images have secrets A.K.A. the making of aesthetic passwords

This is my implementation of a prng steganography tool written in Python. You can also find the code on GitHub. Steganography is the art of hiding messages in (images, videos or even audio) I've ...
Ludisposed's user avatar
  • 11.8k
3 votes
2 answers
2k views

Random Password Generator based on user input

This is my second program written in python. It basically creates a password made up of numbers, capital and lower case letters with the option to include special characters and dashes. I created a ...
luis's user avatar
  • 81
5 votes
1 answer
1k views

Random MP3 Selector and Player

So, I am either a glutton for punishment, or I have no life, but I wrote a script to answer a question over on Ask Ubuntu as a solution for selecting a random MP3 file in a given directory, and ...
Thomas Ward's user avatar
  • 2,538
3 votes
1 answer
1k views

Multiplication Exercise Generator

I'm new to programming in Python, and I am trying to create a multiplication exercise generator. I've got the following code for the solution, but I'm wondering if there is any more elegant solutions ...
R. Holland's user avatar
7 votes
1 answer
258 views

How random can you get?

I work for a service desk and change A LOT of passwords. Most the time the end user is a complete fool that doesn't understand the requirements for the password they want to use. So I created a ...
Pyth0nicPenguin's user avatar
2 votes
2 answers
5k views

Printing random lines from a file in Python

Is this the most efficient solution or can the performance be improved? Just opens a file and prints random words (lines with newlines stripped out). ...
Samuel Shifterovich's user avatar
2 votes
2 answers
1k views

Basic 3 Round Card Game

Feel free to critique my code and offer suggestions on how to clean it up and make it more presentable. I have been working on this for a few days, and learning as I go. ...
IP Address's user avatar
4 votes
2 answers
2k views

"Guess my Number" game in Python (2.7.9)

First time posting to Code Review. Just looking to get some advice on how I can write better code. I found the following exercise for a "Guess my Number" game on DaniWeb, but the linked source code ...
Samantha's user avatar
2 votes
2 answers
1k views

Random positioning and movement of a rabbit on a table

I was inspired by this: If you would put a rabbit randomly on a circular table with radius r= 1 meter and it moves 1 meter in a random direction, what is the chance it won't fall off? I decided ...
jdrd's user avatar
  • 23
11 votes
4 answers
4k views

Generate set of random numbers and remove lowest

I'm learning some Python with my kids, and we're making a program to generate D & D characters from user input. One portion of the code is to generate stats, which are a set of six numbers where ...
Stidgeon's user avatar
  • 245
8 votes
3 answers
4k views

Python Turtle screen saver

Leon asked a question which got closed both here and at Stack Overflow, but I kind of liked the idea, so I implemented a working version of his code, which I now want reviewed. With regards to Leon's ...
holroy's user avatar
  • 11.8k
11 votes
1 answer
2k views

Balanced Random Assignment in Python

It has been a very long time since I've used Python. What I'm looking for: I would like to create a 6-by-6 random matrix where each component is either 1 or 2, so that there are 18 ones and 18 twos. ...
Clarinetist's user avatar

15 30 50 per page