Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
2 answers
715 views

Console animations

I'm a coder who's relatively new to Python and I wanted to spice up my console applications a bit by making animations. The code I've written works perfectly, but I just wanted to know if it was good ...
SemAllush's user avatar
  • 191
1 vote
2 answers
1k views

Argument parser for a word count and/or line count program

How to make code dry in this example? My program is working, but I want to improve it by shorting my code. . ...
Ivic's user avatar
  • 33
4 votes
2 answers
9k views

Reading and Writing in same script

I just finished working through Exercise 16 of Learn Python The Hard Way. To further study, I wanted to create a script that will read and display a file's contents on screen, and then have the user ...
R2DPoop's user avatar
  • 41
5 votes
1 answer
1k views

Edit configuration files script

Script designed to avoid manually edit configuration files by support. Config file example: ...
setevoy's user avatar
  • 797
6 votes
1 answer
1k views

Dict of names and birth dates which prints with age at birthday of current year

As a beginner (Learn Python the Hard Way), I've set myself this exercise with classes and it works but looks very inelegant to me. I'm trying to write classes which could be re-used in other code. I'...
j-o's user avatar
  • 137
4 votes
2 answers
104 views

Basic value comparisons

I made a value comparison "programming language" similar to a previous one I made, except this one is based solely on value comparisons. ...
Vladimir Putin's user avatar
5 votes
2 answers
6k views

Text-based adventure game with combat and game-reset functionality

Please suggest improvements/refactoring to this game to make it more idiomatic Python. ...
MattO's user avatar
  • 153
10 votes
3 answers
219 views

Saving player name throughout script-launches

I would like to use this in a program to save users' names even after they relaunch the script. I was just wondering if there were some ways I could clean up this code. Note: this currently was made ...
tda's user avatar
  • 607
3 votes
3 answers
801 views

Simple hashing code with excessive conditional statements

Any thoughts on my code? It's a simple hashing code that runs from the command line. There just appears to be a lot of condition if / ...
thefragileomen's user avatar