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
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 ...
4 votes
3 answers
6k views

Compare files by name in two folders A and B and delete duplicates from folder A

I wrote my very first Python program to answer a Super User question. I'm wondering how the application can be rewritten to make it as pythonic as possible. Unit test ...
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 ...
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 ...
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 ...
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 ...
2 votes
2 answers
346 views

Integer to Roman Numerals (1 - 2999)

This is a homework assignment. Convert an integer (1 - 2999) to roman numerals. I was wondering if I could make my code more efficient. The way I have it set up is that I take the digits of the input (...
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). ...
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 ...
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 ...
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 ...
23 votes
3 answers
4k views

Financial website scraper

I wrote the code that would scrape Finviz for tickers and href that attach to the ticker. I tested with multi-page as well as one page. I'm new to Python ...
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 ...
1 vote
1 answer
79 views

A simple JavaScript function that does prime factorization

This is a simple JavaScript function that does prime factorization. I wrote it on an Android phone with online editor (I don't have access to computers in night time): Code: ...
1 vote
1 answer
108 views

Enemy damaging with regen system

Small project i made to practice my c++, im a beginner and want to know all about optimizing code. Enemy starts off with 10 HP and we can damage them for 1 HP by pressing F1, If their HP is below ...
1 vote
1 answer
42 views

Multiple grouped value select component

I've been designing a React component to select countries that a user has visited, grouped by continent. This component is a part of larger project but is relatively self contained. This is my first ...
4 votes
1 answer
896 views

PowerShell - fast remove a directory with 10,000+ files

I am sick of File Explorer's super slow deletion speed, so I tried to write a PowerShell script to make deletion faster, and while it does its job, its speed isn't as high as what I intended it to be. ...
1 vote
1 answer
154 views

MATLAB / vs Python np.linalg.solve, heat diffusion

I am solving a simple 1D steady heat question using spectral method. I am a long time MATLAB and Mathematica user and trying to learn Python. I compare only linear solving times and Python is way ...
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 ...
2 votes
2 answers
661 views

Calculating Discount C++

The following question is from the book Problem Solving With C++. This is given as an exercise in the chapter "Functions for all subtasks": Write a function that calculates a discount ...
2 votes
1 answer
57 views

Credit Card Validation Check (Using Luhn's Algorithm)

...
1 vote
2 answers
202 views

Tic-Tac-Toe vanilla JS Pseudo OOP

I'm working on building a simple game in vanilla JS (tic-tac-toe). Some weeks ago I created a functional MVP and asked some questions about it (Vanilla JS Tic-Tac-Toe). The code worked, but it was a ...
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, ...
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 ...
5 votes
1 answer
98 views

How can I make my Pygame Tic Tac Toe game better?

I have this code ready and it works just fine. But what are the ways by which I can improve this code? I have no CS background and this is my first coding project. I could not paste my entire code so ...
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 (...
8 votes
3 answers
5k views

Sums of some array elements

I'm doing an archived MOOC at the moment which introduces Ruby programming. There are some assingments, yet no solutions and since the MOOC is over no one will correct those (+ the forum is down) I'm ...
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 ...
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 ...
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 ...
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? ...
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, ...
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 ...
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 ...
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 ...
0 votes
2 answers
261 views

Common styles in React-Native

Background: I am completely new to react-native. Question: Is there any reason why I shouldn’t do this from an experienced point of view? Goal: - have common styles in my react-native app? - use ...
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 ...
6 votes
3 answers
18k views

ATM program in C

Had to create this for my class, figured I'd get some advice/insight on how I can advance my program while making it more efficient. Also want to help anyone who may come across the same assignment ...
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. ...
1 vote
3 answers
4k views

Hackerrank Inherited Code

I'm back at it again with an Hackerrank challenge-Inherited Code . I just learnt exception and I thought it will be a great idea to get a second opinion on my implemented ...
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. ...
3 votes
3 answers
1k views

PowerShell script to convert .reg files to PowerShell commands

This is a PowerShell script I wrote a while ago that converts Windows Registry files to PowerShell commands(New-Item, Remove-Item...
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 ...
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,...
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 ...
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 ...
6 votes
3 answers
216 views

Produce an arithmetic progression

I have made a function which takes in an end point and a step, then produces a list of integers with the step in mind. For example, if the end point is 10 and the step is 2, the function should return ...
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 ...
6 votes
1 answer
82 views

Extracting numbers in specific ranges from a slice

Consider a slice with some floating point numbers: nums := []float64{0.17898, 0.25512, 1.98123, 1.35902, 0.97642} Suppose I want to extract the numbers lying in ...
0 votes
1 answer
26 views

Modify a string by identifying a substring, and replace it and the characters following it with a newly computed substring

I'm working on a string manipulation code in C++ for my internship project, where I have to find a substring within a string and essentially replace it and some characters following it with a newly ...

1
2 3 4 5
146