r/ProgrammingPrompts • • Mar 04 '20

Looking for ideas

6 Upvotes

Hi Guys! I’m a freshman and I’m looking to take part in my school’s optional self directed development project during the summer. I will have to create a web application with a database backend as part of the project. Can I have ideas on what I can develop that would meet the requirements?


r/ProgrammingPrompts • • Aug 19 '16

Need a little help with a script I want to write.

6 Upvotes

Hi everyone. So I work for a company and in my team we are like 20 people, each one with different skills (we also share some of them).

To give you and example >

Guy 1 has A,B,C,F skills

Guy 2 has A,B,E,D skills

Guy 3 has C,D,F,A skills

We are about 20 and when we have lunch breaks, we split in 2 teams. I would like to create a script that takes all this data, compares it and returns the users split in 2 teams while the skills are all covered for both hours.

Counting that sometimes not everyone is in the office I was thinking I should start by creating some sort of database where everyone has his own skills assigned and in the morning when I have to create the lunch schedule I add the names of the people that are present and the script runs only taking in account this stored data.

Now I'm not a programming genius but I would like to make this automatically run by a script without having to check every morning and comparing all the skills and shit.

I was thinking Excel to store information ans SQL to extract them?

I don't really know where to start. I don't want you guys to make it for me. Just asking which kind of language should I use and what should I focus on.

Also there are a couple of other variables to be taken in account but lets see if someone reacts to this post first and in case this goes well I will also put more info.

Thanks a lot!


r/ProgrammingPrompts • • Oct 16 '15

[Medium] Bowling Scores

6 Upvotes

Create a bowling score from an input string of roll marks.

Here's what roll marks look like:

"X-/X5-8/9-X811-4/X"
"9/8/9/8/9/8/9/8/9/81"
"9/8/9/8/9/8/9/8/9/8/9"
"XXXXXXXXXX9/"
"XXXXXXXXXXXX"

The roll mark strings above are complete representations of a bowling game. If you create your own test strings, make sure that they are complete.

Here's a web page describing how to score a bowling game. Your application does not have to deal with fouls (F) or splits (S).

Your task is to produce something similar to the following output:

---------------------------------------------------
|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|
---------------------------------------------------
|   X|  -/|   X|  5-|  8/|  9-|   X|  81|  1-| 4/X|
|  20|  40|  55|  60|  79|  88| 107| 116| 117| 137|
---------------------------------------------------
---------------------------------------------------
|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|
---------------------------------------------------
|  9/|  8/|  9/|  8/|  9/|  8/|  9/|  8/|  9/| 81 |
|  18|  37|  55|  74|  92| 111| 129| 148| 166| 175|
---------------------------------------------------
---------------------------------------------------
|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|
---------------------------------------------------
|  9/|  8/|  9/|  8/|  9/|  8/|  9/|  8/|  9/| 8/9|
|  18|  37|  55|  74|  92| 111| 129| 148| 166| 185|
---------------------------------------------------
---------------------------------------------------
|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|
---------------------------------------------------
|   X|   X|   X|   X|   X|   X|   X|   X|   X| X9/|
|  30|  60|  90| 120| 150| 180| 210| 240| 269| 289|
---------------------------------------------------
---------------------------------------------------
|   1|   2|   3|   4|   5|   6|   7|   8|   9|  10|
---------------------------------------------------
|   X|   X|   X|   X|   X|   X|   X|   X|   X| XXX|
|  30|  60|  90| 120| 150| 180| 210| 240| 270| 300|
---------------------------------------------------

Your output doesn't have to match my output character for character. You have to produce the game score. Producing the frame scores help with debugging.

The reason this is an interesting challenge is because of the number of corner cases or edge cases inherent in such a simple problem description.

Your application will probably not be short. That's OK. Just make sure it's correct.

I wrote this with Java. My version is 210 lines long. I'll post it in a week or so.


r/ProgrammingPrompts • • Aug 26 '15

Write a pure toString() && toInteger()

6 Upvotes

Write your own toString(int number) and toInteger(string str) functions. you can't "include" or "import" or "using" anything. you can't use built-in functions Make them 100% pure ;) Good Luck!

My solution: ( C++ )

// Get the length of an integer
int length(int data,int len=0){return(!(data/10)?++len:length(data/10,++len));}

string toString(int num){
    string str="";int temp;
    for(int i=0;i<length(num);i++){
        temp=num;for(int j=i;j<length(num)-1;j++)temp/=10;
        str+=length(temp)>1?(temp-((temp/10)*10))+48:temp+48;}
    return str;}


int toInteger(string str){
    int total=0,temp=0;
    for(int i=0;i<str.length();i++){
        temp=str[i]>='0'&&str[i]<='9'?str[i]-48:0;
        for(int j=i;j<str.length()-1;j++)temp*=10;
        total+=temp;}
    return total;}

r/ProgrammingPrompts • • Mar 19 '14

MOD: Would anyone be interested in helping me mod this subreddit?

6 Upvotes

I am amazed at how fast numbers have grown on this sub though I fear that my schedule keeps me from moderating things as well as I should. If anyone would be interested in helping me keep this running here, I would be very grateful. Thanks!


r/ProgrammingPrompts • • Mar 07 '25

Death notifier

5 Upvotes

Sounds a bit morbid, I know. The idea consists of:

  • An application that watches Wikipedia articles about people for the "died" entry

  • User interface for selecting certain people or categories of people (actors, musicians, etc.)

  • Mailing list for notifying users when those people die


r/ProgrammingPrompts • • Sep 19 '22

Create a runoff voting system with simple UI

5 Upvotes

MVP would be a simple two-round runoff model.

A stretch goal would be to be able to select from different types of runoff voting models.

This would also be an ideal next-step after finishing the Django tutorial which includes a basic poll app.

References:
https://en.wikipedia.org/wiki/Runoff_voting
https://docs.djangoproject.com/en/4.1/intro/tutorial01/


r/ProgrammingPrompts • • Oct 30 '20

Creating a fake credit system for a school's project website.Need guidance

5 Upvotes

Hi yall. So as title say's I have created a game website. So I need to add some thing to it to look more realistic. So I have a question Can I do like fake credits system which grants like 500 like 'we happy your are signed in so here is your 500' and than I would create mini-games which costs like 50 to enter and play on website. Depending of score it would grant some more credits to persons account. So I need help or guidance from where to start. Any tips would be apprecianted. I can write codes in C++, mySQL, ,PHP , HTML, CSS, JAVASCRIPT. Keep in mind I know these language's in begginer level and I can read more on subject or something to learn much more to my requested topic . But main project is done throught PYTHON with FLASK and I can use any code language's I want to add in some thing to it. So if anyone have any tutorial links or experience in that or plan how to realise it. I would highly appreciate it. If anyone require's info on code or something from me feel free to ask and critise. Thank you in advance !


r/ProgrammingPrompts • • Apr 01 '16

[Medium] Cross product of a list of lists. The function should be able to handle any list size.

5 Upvotes

Given a list of size n, Write a program that returns all possible combination of elements contained in each list.

Example:

  • List A = "x, z"

  • List B = "a, b, c"

  • List C = "o, p"

Output:

  • x a o

  • x a p

  • x b o

  • x b p

  • .....

  • z c p

Order doesn't matter, but the hard part is: You can't use recursion.


r/ProgrammingPrompts • • Feb 11 '16

[Easy] Make an ASCII Summation Calculator

5 Upvotes

Write a program that takes in a string from the user (or if you want, a file!) and prints all the characters' ascii values summed up to the user.

For Example: The above paragraph's ascii sum is 13,156

Edit: It is actually 13,124 thanks /u/Answers_With_Java, I ran my program again and I got that as well, I dunno why I wrote 13,156


r/ProgrammingPrompts • • Aug 13 '15

[MEDIUM] Write a Program that can solve alphametics

5 Upvotes

Write a program that can solve alphametics. Alphametics are nothing else than equations, only with letters:

AA + BB = CC

in this case:

A = 1 B = 1 C = 1

so the solution is:

11 + 22 = 33

Also, one the same number can't be referred to by two or more letters, so:

A = 0 B = 0 C = 0

is not possible (even if it is correct)

Your job is to write a progam in which the user can input an alphametic (GUI or console, doesn't matter), and the program finds the right (or one of the right) solutions to math numbers to the letters so equation is correct.


r/ProgrammingPrompts • • Apr 18 '16

Create vanilla js custom web components

4 Upvotes

Write a set of vanilla js custom web components that can be used as a tag on HTML (like clock, timer etc ) rather than updating the dom using jquery plugins , which decrease the beauty of code and increase maintainence.


r/ProgrammingPrompts • • Nov 16 '15

[Easy] Music Playlist using links with Counter

4 Upvotes

Make playlist either in browser[JavaScript] or using some other language so that a list of music(links) can be played by adding links.

Also Add a countdown timer on to the program for 5 minutes so that a new song can be played once the old one is done.

(It would be good if the new song was not played in a new tab so that by the end there aren't 100 tabs or kill each tab after the 5 minute countdown)


r/ProgrammingPrompts • • Nov 21 '14

need help with text game (Java)

4 Upvotes

So i started learning coding a week ago and Java is my first language I found a simple text based dungeon with health potions and random enemy's appear. im still getting the hang of reading and understanding what the code is doing. But my question is how would i go about adding something like a counter to count enemies defeated (among other things). going in and changing whats already there is easy, im not at the point where i can figure out how to implement the things i want to add. Any helps tips will be appreciated. here's what i got from youtube.

package tutorials;

import java.util.Random;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
 
    //System objects
    Scanner in = new Scanner(System.in);
    Random rand = new Random();
    
    // Game Variables
    String[] enemies = { "Sully's mom", "Old Dildo", "HER FACE!!!!", "Assassin" };
    int maxEnemyHealth = 75;
    int enemyAttackDamage = 25;
    
    //Player variables
    int health = 100;
    int attackDamage = 50;
    int numHealthPotions = 3;
    int healthPotionHealAmount = 30;
    int healthPotionDropChance = 50; //Percentage
    
    boolean running = true;
    
    System.out.println("\t Welcome to Sully's Butthole");     
    //Label
    GAME:
    while(running){
        System.out.println("\t-----------------------------");
    
        int enemyHealth = rand.nextInt(maxEnemyHealth);
        String enemy = enemies[rand.nextInt(enemies.length)];
        System.out.println("\t# " + enemy + " has appeared! #\n");
    
        while (enemyHealth > 0){
            System.out.println("\tYour HP:" + health);
            System.out.println("\t" + enemy +"s HP:" + enemyHealth);
            System.out.println("\n\tWhat would you like to do");
            System.out.println("\t1. Attack");
            System.out.println("\t2. Drink health potion");
            System.out.println("\t3. Run");
        
            String input = in.nextLine();
            if (input.equals("1")){
                int damageDealt = rand.nextInt(attackDamage);
                int damageTaken = rand.nextInt(enemyAttackDamage);
            
                enemyHealth -= damageDealt;
                health -= damageTaken;
            
                System.out.println("\t> You strike the " + enemy + " for " + damageDealt + " damage");
                System.out.println("\t> You recieved " + damageTaken + " in retaliation");
            
                if (health < 1){
                    System.out.println("\t You have taken too much damage, you are too weak to go on");
                    break;
                }
            }
            else if (input.equals("2")){
                if (numHealthPotions > 0 ){
                    health += healthPotionHealAmount;
                    numHealthPotions--;
                    System.out.println("\t You drank a health potion, healed for :" +healthPotionHealAmount +"."
                                     + "\n\t> You now have " + health + " HP."
                                     + "\n\t> You now have " + numHealthPotions + " health potions left. \n");
                }
                else{ 
                    System.out.println("\t> You have no health potions left, defeat enemies for a change to get one!");
                }
            }
            else if (input.equals("3")){
                System.out.println("\tYou run away from the " + enemy + "!");
            
                continue GAME;
        }
            else {
                System.out.println("\tInvalid command");
            }
        }
        if (health < 1){
            System.out.println("You are swallowed by the darkness of sully's ass never to be seen again.");
            break;
        }
            
        System.out.println("-----------------------------");
        System.out.println("#" + enemy + " was defeated!#");
        System.out.println("#You have " + health + " HP left#");
        //if the random number is less than 40 it drops
        if (rand.nextInt(100)< healthPotionDropChance){
            numHealthPotions++;
            System.out.println("#The " + enemy + " dropped a health potion!#");
            System.out.println("#You now have " + numHealthPotions + " health potion(s).#");
        }
        System.out.println("-----------------------------");
        System.out.println("What would you like to do now?");
        System.out.println("1. Continue Fighting");
        System.out.println("2. Exit dungeon");
        
        String input = in.nextLine();
        
        while (!input.equals("1") && !input.equals("2")){
        System.out.println("invalid command");
        input = in.nextLine();
        }
        if (input.equals("1")){
        System.out.println("You continue your adventure.");
        } else if (input.equals("2")){
        System.out.println("You exit the dungeon.");
        break;
        }
    }
{
    System.out.println("####################");
    System.out.println("#THANKS FOR PLAYING#");
    System.out.println("#####################");
    }
}

}


r/ProgrammingPrompts • • Mar 02 '25

Brainfuck interpreter

3 Upvotes

For those who don’t know, this is the brainfuck programming language: https://en.m.wikipedia.org/wiki/Brainfuck

Essentially Brainfuck was developed as an attempt to create the most simplistic programming language possible.

Brainfuck only has 8 commands and operates on a usually infinite array of bytes with the default value of 0.

The commands are the following:

  • increments the byte value currently pointed at by 1

  • decrements the byte value currently pointed at by 1

increments the data pointer by 1

< decrements the data pointer by 1

. outputs the value of the byte currently pointed at (usually as an ASCII value)

, accepts an input byte and stores it in the byte currently pointed at

[ if the current byte is 0, jump forward to behind the corresponding ]

] if the current byte is not 0, jump backwards to behind the corresponding [

Any character besides those 8 in the script is to be ignored and can be treated as a comment.

While this project certainly isn’t for somebody completely new to programming, it‘s a great exercise for somebody that already is familiar with the basics and is looking for a small challenge. It‘s not too complicated either though and it is incredibly rewarding seeing your little program be able to execute scripts written in another programming language.

You can find a sample „Hello World“ script for testing on the linked Wikipedia page, it does not use the input command though.

EDIT: Reddit formatting messed up the description. The commands at the top are +, - and > in that order.


r/ProgrammingPrompts • • Feb 02 '24

A snippet of code that looks like it does something else, but when run it prints "Gotcha!". There should be no string with value "Gotcha!". How obscure or surprising an answer can you come up with?

3 Upvotes

Extra points: It should look like it does something sensible, and not random bit managing, at first glance you would expect something, but something else happens. The ideia is not to make the code unreadable, but "easily-wrongly-readeable". I don't want to do anything shady - it's to teach a few friends about code readability. Thanks for any effort"


r/ProgrammingPrompts • • Jan 21 '23

Quizlet Web Scraper

3 Upvotes

Create a program which requests a Quizlet flashcard set URL and scrape it for the term and definition of every card in the set.

Save the term and definition in a json, csv, or any other big data file type.


r/ProgrammingPrompts • • May 06 '20

Word decoder

3 Upvotes

I've been trying to think of a way to do this on python,

It works as there are 5 columns with letters in it The columns can me mixed and see how many possible words you can make for example

Column 1: L O B F A K N E R I Column 2: L I N A Z U F O M E Column 3: E W T N V A L S G P

You can make the word BEN From the B in column 1, E in column 2 and N in column 3


r/ProgrammingPrompts • • Jun 11 '18

Experimental film project

3 Upvotes

Hello guys, i am a Brazilian cinema student and i had an idea for a small project, Glauber Rocha is a brazilian director from the last century that experimented greatly on the cinematic language, he did a movie called “The age of the Earth” that is composed of 8 reels. Glauber separated the movie in 8 so that they could be played in any order, thus creating a movie with many different meanings; the possible permutations of 8 reels is 8! (40,320) so this movie could be played in many different orders. I wanted to create a program that would play the movie at a random order every time without giving the user the ability to select the order. Sadly, i don't know any programming. If any of you are interested in doing something like this as a small creative project let me know! This doesn't have any commercial interest, it is just “something to have”.


r/ProgrammingPrompts • • Oct 05 '17

Replicate this Demo - Random Chance Activity

3 Upvotes

I made this demo using the PHP based Hashtag Framework: Random Chance Activity

I'm looking for volunteers to provide example solutions to replicate the demo using any other framework or language, preferably on a live server.

Just to be clear about what i'm looking for... assume these requirements for a Web App:

  • Every 3 reloads of the page by the same end-user, a record is created in a list seen by all other users reloading the same page.

  • For every reload, each record has a 10% chance of being linked to a new attribute that brings with it a chance of the record being marked as "lost" on later reloads, excluding it from the main list.

  • There are 3 unique chance of loss attributes, that each apply an independent chance per reload of the record being marked as "lost".

That's it... so, given those requirements, how would you build a Web App that would solve those requirements?


r/ProgrammingPrompts • • Jul 07 '17

Alphabet/Glyph Evolution Simulator

3 Upvotes

My idea is to create a code/program that simulates the evolution of alphabets and letters over time in terms of shape, sound, and linguistical use in a language. I imagine the program to take in an input of a 64x64 pixel drawing of the letter/glyph and have the code alter it slightly overtime by adding pixels, connecting gaps, deleting pixels, rotating, etc. If anybody has any idea how to go about writing this program, please let me know and/or give me any sort of feedback about my idea for this code.


r/ProgrammingPrompts • • Jan 16 '26

Minimal Search Strings

2 Upvotes

You are given a list of terms in a searchable dropdown menu in alphabetical order. Find the minimal string the user must type to narrow the results to the extent that a given term is at the top of the list.

Ex. List:

  • Apple

  • Airplane

  • Banana

  • Bananner

The best search for 'Airplane' would be 'ai' (assuming not case-sensitive). The best for 'Banana' would be 'b', because that would immediately bring "Banana" to the top.

Some ideas for customization options:

  • Is the search Case-Sensitive?

  • Can the search term appear in the middle of the result, or does it have to be at the start?

  • If the item has multiple words, can you only search by the first word?

  • Word separators other than space characters? (maybe parentheses, hyphens, other non-letter characters are treated as spaces)

  • Handedness? Maybe you would want to prefer that the search strings only contain keys on the left side of a traditional QWERTY keyboard layout, or prefer that whichever side it's on, that there isn't a large travel distance between the letters for convenience's sake.

  • Is 're' an acceptable search for the word 'AiRplanE', or does the exact string ('re') need to appear in the word in that way?


r/ProgrammingPrompts • • Nov 08 '25

A music website that analyses guitar solos and gives them a rating based on difficulty, with motivation

2 Upvotes

I don't have a really detailed idea on how to structure such a website, but the general idea is already in the title.

I have two different ideas for how to make the website identify accurately the solo to analyse:

1 - once pasted a Youtube link or a Spotify link with the song, the website automatically analyses the song, extracts what it thinks is the guitar solo, and asks the user if that's the solo he wants it to analyse. The user can answer "yes" or "no". If "yes", the website will begin analysing it to come to a rating, if "no" the website will continue searching for the solo until it finds it.

2 - once pasted a Youtube of Spotify link with the song, the website asks the user to signal the exact time of the solo, from when if begins to when it ends (example: if a 5 minute song has a solo that begins at 2:20 and ends at 2:50, when asked by the website "please provide timestamps of the solo", the user will write "2:20-2:50"). That way, it'll be easier for the website to know where to search.

Then, once found and extracted the solo, the website will proceed to analyse it based on various factors (BPM, tempo changes, intricate passages, difficult techniques, etc). And once finished, the site will give a rating, and list the motivations of said rating. The ratings can be: very easy, easy, medium-easy, medium, medium-hard, hard, very hard.

As an optional feature, the website can keep a history of all the solos you made it analyse, with an option to rank them based on the difficulty


r/ProgrammingPrompts • • Mar 06 '23

Boxes / Containers database

2 Upvotes

I had an idea of database where you can store data about boxes in tree format. The structure of box object looks like this:

Box structure:

Attribute nameValue TypeDescription
idnumber (unique, counted globally)This number will be used for operations on that container.
attributiveskey-valueIn this object attributes like name, size, location will be stored. Attributes will be used for searching and filtering.
boxesarray of boxes objectsThis allows the boxes to form a tree structure.

Actions on that data will be preformed in javascript. The actions needed are add, delete, edit, filter and search. The data would be saved in JSON. Easy integration to other applications is needed.