Questions tagged [beginner]

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

first React project - Lights Out game

I am working my way through a React tutorial on Scrimba (I am not finished yet). I got to a certain part that inspired me to try a project on my own. I made a game of Lights Out. If you've never heard ...
user avatar
1 vote
7 answers
2k views

Print a list of license plate numbers of all cars that went over the speed limit, as well as the average speed of each of those cars

I wrote a working code and was wondering if it could be shortened as I saw a lot of similarities in my loop and if statements. I hope it's possible as I want to make it a bit cleaner. I had to print a ...
user avatar
4 votes
2 answers
492 views

A simple spaceship game

How could I improve this code? It's a little game. If you run it, instructions will appear. In particular, I'd like to know whether I can make it considerably shorter any trick :) ? whether I can get ...
user avatar
0 votes
0 answers
36 views

Television and channel modelling [closed]

I wrote a simple project to train my beginning knowledge of OOP. My class represents a Televisor that has two types of channel list: the first one is global, that's applied to all objects of my class ...
user avatar
2 votes
1 answer
56 views

Simple Brainfuck interpreter in C with support for nested subroutines

Wrote a simple brainfuck interpreter that supports nested subroutines ([ ] commands). ...
user avatar
2 votes
1 answer
68 views

Animating GIF on hover in Javascript

I don't know JavaScript and it's safe to say this is my first code ever written in JS. I just needed to animate my GIFs when user hovers over them only. Googling separate concepts such as "string ...
user avatar
  • 1,375
3 votes
2 answers
73 views

Parse the weekly menus of a German delivery service

I am a C# beginner, and I wrote a program that parses the weekly menu of a German delivery service. It works fine and I think the code quality is okay. Can anyone with more experience than me review ...
user avatar
6 votes
1 answer
235 views

Check stock status at a retailer

I am learning Python and wrote this code to check (every 10 mins) whether a product is available at a retailer, since it usually runs out of stock pretty quickly. It's working as expected, but can ...
user avatar
  • 61
3 votes
1 answer
62 views

First assembly program: working with strings and integers

I started learning assembly some days ago and I wrote my first program today. Nothing exceptional here: some user inputs, strings manipulations, integer to string conversion etc... The only purpose ...
user avatar
2 votes
1 answer
57 views

Credit Card Validation Check (Using Luhn's Algorithm)

...
user avatar
  • 333
1 vote
4 answers
86 views

Beginner Python program assignment: calculate the total number of bugs collected in a week using a while loop

Beginning of program assignment has a bug collector input the amount of bugs collected each day of the week then outputs the total number of bugs in a print statement. My professor has forbid us from ...
user avatar
  • 11
15 votes
3 answers
3k views

My 1 Week Python Journey — A Quiz Game that I made in Python

I started my Python Journey almost a week ago from now. I had been following a Youtube tutorial earlier, but switched to Harvard's CS50P instead. I decided on making a little Quiz Game with my ...
user avatar
  • 333
1 vote
1 answer
49 views

Convert string to date C++

New to C++ here, by combining different pieces of code I've found, i came with this solution below to convert a date in string to a date object. It works as I want but I'm not certain to do the ...
user avatar
  • 219
2 votes
2 answers
110 views

Bogo Sort Algorithm

I am a beginner programmer and have written a program that sorts a number of integers of your choosing using bogo sort. Are there any improvements that could be made to make this code more efficient (...
user avatar
3 votes
1 answer
41 views

Transform textarea input into camelCase

The code below transforms the text area's input to camelCase. I am wondering if this code is considered correct to write in terms of performance and readability and if not, what are your improvements? ...
user avatar
  • 33
6 votes
4 answers
892 views

Guessing the Number Game

I started my python journey 4 days ago. I am following a Youtube tutorial currently to understand the basics of Python. So bear in mind that I am REALLY new to this. I wanted to test myself a little ...
user avatar
  • 333
4 votes
2 answers
258 views

Another number-guessing game

I am a newbie in Python and would very much need help in arranging and setting out function. I have programmed a number guessing game. The outlook of the program is very messy but I don't where to fix ...
user avatar
  • 41
5 votes
1 answer
63 views

Snake Game Clone in JavaFX

I am a beginner at programming. I made this snake game in JavaFX to practice and improve my coding skills. I tried to make my code clean, but I'm not sure if it is, or if it is well-organized. I also ...
user avatar
  • 53
6 votes
2 answers
563 views

Simple number-guessing game in Haskell

I've been learning Haskell for 2 weeks now which is I'm very new to it. I would like to have feedback on what is good/bad about my code and how it could I improve in learning functional programming ...
user avatar
  • 63
2 votes
0 answers
31 views

Dropdown menu that visually includes the toggle button in it

I'm a beginner in front-end development and tried to make a dropdown menu that includes the toggle button within the menu, instead of opening a separate menu besides the toggle button. I went with ...
user avatar
6 votes
1 answer
88 views

MadLibs builder

This is actually my version of a project I'm giving to my class of High School juniors. I'm not the greatest programmer and also a new teacher so I was hoping someone could check out this code and ...
user avatar
6 votes
2 answers
418 views

Determine a diver's table and schedule based on depth and duration

I'm new to coding but I'm particularly new to python. I wrote a program that will determine a diver's table and schedule(because it relates to my job). It essentially assigns a value from multiple ...
user avatar
1 vote
2 answers
64 views

Simple snake game with C and raylib

Made a simple snake game using C and raylib for graphics, Would like to be critiqued on the clearity and efficiency of the code. ...
user avatar
7 votes
4 answers
179 views

Sum and bubble-sort student scores

I am a beginner in C language. I studied all night and did my assignment. But I wonder if there is a more efficient way. The original structure is this. ...
user avatar
  • 71
12 votes
6 answers
2k views

One of my first Python projects - an adventure game

This is a simple text-based adventure game I made. I'm a beginner and I want to know if the code is optimal or if it can be improved. The story is not very complex, but I made it more for practicing ...
user avatar
4 votes
1 answer
99 views

Vectorset, a faster std::set

I decided to implement a vectorset, which is intended to be faster than std::set for the 3 fundamental operations, namely insert,...
user avatar
  • 41
0 votes
1 answer
56 views

Calculates delivery charges and number of deliveries

Function: Calculates delivery charges based on area and also shows number of deliveries (fast food shop). Created to stop bickering from drivers and for stats. code: ...
user avatar
  • 191
2 votes
3 answers
72 views

Text Based Minesweeper in Java

I have been working on a text based minesweeper game in Java and I am looking for some ways to improve it. I worked through this project through JetBrains academy. I will attach the instructions of ...
user avatar
3 votes
2 answers
71 views

Random dice class based off D&D

I am learning C++ and I took on this small project to get more familiar with OOP. The goal was to create a Die class that randomly rolls and returns a value based on the sides of the die, the number ...
user avatar
2 votes
1 answer
38 views

Simple Manual Lexer in Haskell

As a beginner exercise, I made small manual lexer that recognizes three types of inputs: integers: /[-]?[0-9]+/ strings, inside double quotes, with backslash ...
user avatar
2 votes
0 answers
45 views

JavaScript functions to generate Pythagorean triples

I am sure you know what Pythagorean triples are, in the extremely unlikely case that you don't know: A Pythagorean triple consists of three positive integers a, b, and c, such that $$a^2 + b^2 = c^2$$...
user avatar
2 votes
2 answers
84 views

3 dimensional python battleship game

I have an assignment in a python course. We were instructed to make a 3D Battleships game for 2 players on the same computer. I've written a code that works, according to the assignment instructions, ...
user avatar
8 votes
2 answers
90 views

Frozen yogurt shop simulator

I made this project that simulates a frozen yogurt shop, where you can pick your flavor, toppings, and sauces and then pay for it. I'm a beginner at python and this is my first project. I don't even ...
user avatar
  • 81
9 votes
3 answers
552 views

Computing a simple moving average on an array in C++

I have just started to learn C++ and wanted to improve my function. I am making a basic statistical API and am calculating an SMA (simple moving average) for some data. This function provides the ...
user avatar
  • 191
5 votes
1 answer
154 views

Filter Range VBA function for Excel

Premise I have written a function in VBA, called FILTER_RANGE(), which accepts a Range object and a filtration parameter. Unlike ...
user avatar
  • 179
6 votes
1 answer
94 views

Python battleship game - Code to place random ships on the board

I am writing code to randomly place ships on a board in Python. I need help reducing the amount of Global variables I have in this code. I have thought about using a Ship class here but I'm not very ...
user avatar
4 votes
1 answer
22 views

Download Ubuntu daily ISOs and make them into VMs for alpha and beta testing

I'm an Ubuntu contributor, and I finally got tired of the workflow for ISO testing I was using (zsync, gpg, sha256sum, create Gnome Boxes VM, install, delete VM). So I decided to make a Bash script to ...
user avatar
4 votes
1 answer
397 views

Writing a Java program that outputs a calorie/macronutrient plan for getting in shape over a certain amount of weeks

I am new to programming and was working on a project that calculates an entire "diet plan" as well as a projected weight goal for each week. There are three objects that all have methods ...
user avatar
2 votes
0 answers
21 views

Get ffmpeg command to encode video in x265 codec and downscale to `max_height` resolution

I'm translating the python program video-diet as I am learning rust. The program is to recursively compress video files in a directory, but here I'm just preparing ...
user avatar
0 votes
1 answer
43 views

Rust: Unsecure Static Once

I am basically a beginner, so I Wrote some code that implements a zero cost singleton, through it will crash your program if you have a MMU. ...
user avatar
  • 1
2 votes
0 answers
95 views

Cows and bulls game in JavaScript

I've been working on this game the last 2 days. The game is working but I need a feedback for my code. Can it be made simpler? Sorry if my code is very complicated or not well written: I am in the ...
user avatar
1 vote
0 answers
21 views

Scala & Kafka: Getting the producer and consumer offset difference and log it

I'm looking to compare kafka's producer and consumer ...
user avatar
  • 111
0 votes
0 answers
45 views

Ballerina service resource methods

I'm playing around to find out idiomatic way to write service resource methods for HTTP API so that the actual program logic is separated from the resource methods. Currently the (simple) program ...
user avatar
1 vote
3 answers
95 views

Calculating square roots using binary search

I'm trying to find the square root of a number (num) using binary search in Rust. I'm new to Rust, but I've done quite a bit of programming in other languages, ...
user avatar
  • 111
0 votes
1 answer
29 views

Show/hide depending on ID and Class

I have written some code that shows a div class, based on what ID is clicked. I'm a beginner, so not sure how to make this code compact, it seems way too long at the moment. Can anyone suggest a ...
user avatar
2 votes
2 answers
39 views

Simple non balancing indexed binary search tree

The following code represents a simple indexed binary search tree of integers. The insert method inserts an int. The indexed lookup looks up the ith smallest element (0 indexed). I'm trying to write C+...
user avatar
  • 21
4 votes
1 answer
129 views

Blackjack game in C++

I developed a blackjack game. I am relatively new to c++ and OOP, so I am asking for feedback on what could be improved. This game features betting, taking a card, standing, and splitting a hand. ...
user avatar
1 vote
1 answer
24 views

Sidenav menu that appears when click on button

I have a side menu that appears when click on button, which works fine. But now I want to clean up my code, shorten it if possible. I was wondering if there is an easier and cleaner way to achieve the ...
user avatar
  • 11
2 votes
1 answer
46 views

Python CLI math game

I'm a self-taught programmer starting out with Python and my latest project is this game: It runs in the console, displays an equation, takes the user's answer, and increases your score if it's ...
user avatar
  • 23
1 vote
1 answer
37 views

Clojure Prime Numbers from 1 to 1000

I am a beginner to Clojure and I made a little script that prints out every prime number from 1 to 1000. Let me know if there are any improvements that I can make: ...
user avatar

1
2 3 4 5
146