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
3
votes
1answer
126 views

A TicTacToe command line game in c++

So I've just started teaching myself C++ a few weeks ago and I've decided to work on an implementation of Tic Tac Toe, using the command line. The program allows a human to play against a bot, which ...
6
votes
1answer
296 views

Python: determine whether one string can be obtained by changing one character in the middle of another string

This script solves a simple problem: Input two strings differ one character or zero characters in length, return true if the following conditions are met: 1, They must start with same character and ...
3
votes
0answers
100 views

Chess using pygame

I just completed my second python project which is a chess game. At the moment I have included a mechanism for pieces to lock onto a square based on the nearest square when moved. And I have ...
3
votes
2answers
281 views

Python Math Quiz

In the process of trying to learn python, and also help my daughter with some elementary math practice over the summer, I'm trying to write a simple math quiz which will reinforce what she learned ...
3
votes
1answer
51 views

Python script that makes ngrams

This is a Python script that generates ngrams using a set of rules of what letters can follow a letter stored in a dictionary. The output is then preliminarily processed using another script, then it ...
1
vote
1answer
43 views

Equivalent partition sums

I'm looking for feedback on my solution to the following prompt: Given an array of ints, return the index such that the sum of the elements to the right of that index equals the sum of the elements ...
2
votes
1answer
101 views

FizzBuzz in arm64

I made a FizzBuzz program in arm64; I print out the values in hex instead of decimal. This was the first arm64 program I made and I'm looking for advice on how I can improve it. The code to print out ...
4
votes
1answer
118 views

Rock, paper and scissors

I started reading a book about python two days ago and today I wrote my first code. It's supposed to be a rock, paper, scissors game and from the tests I've done so far it works quite well. However ...
3
votes
2answers
83 views

Show/hide for multiple IDs

I'm don't know much about javascript, but and slowly learning through using other people's code. The below code I'm using is quite repetitive, with the only variance being the ID names. I feel like ...
2
votes
0answers
49 views

Small language, compiles to register VM bytecode

I am trying to implement a small programming language, in Nim, as a way of improving my (close to non-existent) programming skills. The programming language is intended to have IF-GOTO, variables, and ...
6
votes
1answer
87 views

Improving product configurator "algoritm"

I have created a product configurator in VueJS and the whole functionality of it runs on one single function. I've put the word algoritm in the title in quotes because I don't really know if it is ...
3
votes
2answers
61 views

Limit second <select> options based on the first <select>

I want to see if there's a better way to write this code, solely in Javascript. There are two kinds of sets, the first set (C7, T7, C11, T11) have four options in the first select, and then up to two ...
2
votes
1answer
46 views

Tiny attempt at a register machine in Nim

I am attempting to learn the Nim language by making a small and simplistic register machine. It is intended to interpret some basic instructions. The entire parsing lexing process consists of ...
3
votes
2answers
102 views

Possible improvements to window swallowing program?

I have written a small program that swallows windows. It works in X.org using the xcb library. This is my first rust program but I have lots of other programming experience. Any general improvements ...
5
votes
2answers
61 views

Count *.plot files in certain directories on network filesystems

First of all, I am playing around with python for about a week tops. Absolute beginner here. My story: I work as an IT administrator so I am familiar with eg. PS on a very basic level. I actually got ...
4
votes
1answer
74 views

Plan 9 freq(1) in go

I implemented the freq(1) program from Plan 9 in go. ...
0
votes
4answers
125 views

Calculating sum and count of even and odd numbers (follow-up)

(This is follow-up question). I updated my console program code to calculate sum and count of even and odd numbers. Provided code : ...
6
votes
3answers
1k views

Calculate sum and count of even and odd numbers

Started learning C# second time. I have written a console program to calculate sum and count of even and odd numbers. Provided code : ...
5
votes
1answer
102 views

Caesar cipher/beginnings of a crypto library in Rust

As a hobby project (and to learn the language), I'm working on a crypto library in Rust. The following is a component thereof, which implements encryption with and the cracking of the Caesar cipher. ...
2
votes
1answer
45 views

Is there a better approach to group the props and get the count of an object of arrays in javascript, less code but native approach

Could anyone help me with below logic implementation. I am new to Javascript and have been practicing advanced functions. The below code does the job but is there a better way to achieve the same? I ...
3
votes
2answers
171 views

Python 3 approximate pi using 9 algorithms

Note: this script requires gmpy2, if you are using Python 3.9.5 x64 on Windows 10 21H1 like me, then you need to download the pre-built ...
1
vote
0answers
31 views

Simply Scheme book: "functions.scm", How to use basic language constructs to create interactive prompt for function application

While reading Simply Scheme by Brian Harvey and Matthew Wright: Part I: Chapter 2 Functions In this chapter you are going to use the computer to explore functions, but you are not going to use the ...
0
votes
1answer
41 views

Short function to check if an entered answer is close to a correct one

I had this trivia game, and from the review I got I improved my game. One of the improvements I made was this short function, to check the correctness of an answer (so if the correct answer was "...
0
votes
2answers
127 views

Get Each Digits of Number with Using Loops in C++ [closed]

I need a program same as I wrote but using loops. (if else for etc.) . Program is that enter a number and get each digits of number like that: number is 123456. I'm beginner, I can't create the logic ...
0
votes
1answer
44 views

lengthening the time it takes to access files REVISION #3

https://github.com/speedrun-program/load-extender This is the previous version: lengthening the time it takes to access files REVISION #2 To compile this, you need to download and include robin_hood.h,...
4
votes
1answer
115 views

Basic CSV Parser in C++

This was written down solely as a mean to practice basic C++ and isn't meant to serve any production purposes. Clearly, the implementation can't handle all input formats: it always expects the CSV to ...
6
votes
2answers
289 views

Python Place +,-, nothing between 1, 2, …, 9 (in this order) whose sum is 100

So this is a programming challenge I saw: Write a program that outputs all possibilities to put + or - or nothing between the numbers 1,2,…,9 (in this order) such that the result is 100. For example ...
4
votes
2answers
88 views

Simulate transmission spectrum of extreme ultraviolet laser pulse through laser-dressed finite sample (Python Version)

I am currently participating in research on transient absorption spectroscopy and four wave mixing. In the experimental design, an extreme ultraviolet (XUV) laser pulse and infrared (IR) laser pulse ...
6
votes
2answers
1k views

Hamming distance between two strings

I wrote this module to find the Hamming distance between two strings. (It's a problem from exercism.io's Haskell track.) As I saw it, the problem has two distinct ...
3
votes
1answer
158 views

Simple terminal Game of Life in Rust

I've been learning Rust for a few weeks in my free time, and as a first project I decided to make a simple terminal Game of Life program (without UI, that might come later). It just starts with a ...
4
votes
3answers
717 views

Python random word generator that generates a wordlike pronounceable string

This is a random word generator I wrote in Python 3 today, I don't know how many Python implemetations of this exist, but this is my first try and it is completely working. It returns a random word ...
2
votes
1answer
51 views

Python trivia game getting questions and answers off a website

Here is my code that I recently made (I am a beginner). I used BeautifulSoup and Requests to get the data of this website. Please read over my code and tell me how to improve it. Thanks. ...
2
votes
3answers
276 views

Python binary, decimal, hexadecimal, IPv4, octal converter

This is a Python (3) script that converts numbers among 5 data formats: binary, decimal, hexadecimal and octal, it supports 16 conversions, that is, it can convert each of the five data formats to and ...
3
votes
1answer
72 views

Python script that converts Windows Registry Scripts (.reg) into PowerShell scripts (.ps1)

Well this a re-implementation of a PowerShell script that I wrote which does exactly the same thing, and I have ported it into Python. After a quick Google search I found that there is only one other ...
1
vote
3answers
139 views

Basic Linux filesystem commands

I'm learning the file system library and thought nothing could be better than a project, so I thought of recreating the basic Linux commands such as ls, ...
0
votes
1answer
119 views

Fizz Buzz function that returns an array [closed]

I am a newbie to JS and I am working on a FizzBuzz challenge. Below is what I have tried. Essentially when the function takes a value then it would iterate from 1 up to the value and an array would ...
9
votes
3answers
2k views

Simple day-of-week program

I was doing the following exercise: Create an algorithm which asks the user a number from 1 to 7, and each number represents a day on the week. For example, 1 represents Sunday, 2 represents Monday ...
3
votes
1answer
51 views

Simple registration form with validation

I am really new to React and I worked on some challenges. I need to mention I did most of the stuff on my own without much dependence on the internet beside what functions do. I'd like to know if I ...
8
votes
2answers
207 views

log setup using RotatingFileHandler and basicConfig

I am new to python, and developing a moderate application for which I need to setup a logging mechanism. The below program sets up log handling, which gives the user an option to specify whether log ...
5
votes
0answers
96 views

Pi Calculator Using BBP (Bailey–Borwein–Plouffe) - Written in Cython With MPFR

I wrote a Pi Calculator using the BBP Algorithm in Cython. My specific goals are make the code more legible and more performant. This is a purely academic script in order to teach me how to implement ...
3
votes
1answer
357 views

Python code to find greatest common divisor of multiple numbers

Hmm, I know this has been implemented countless times, and Python 3.9.5 math standard library has a built-in gcd() method that ...
0
votes
2answers
74 views

Improving Speed of VBA Code - Copy/paste two sets of variable, Excel does a calculation, returns a value then copy/paste the output value

I am attaching the code here. I am very new to VBA and trying to do a complex calculation using Macro. Please help me improve the speed of the attached code. The code works fine and produces the end ...
2
votes
1answer
101 views

Automate The Boring Stuff - Character Picture Grid

I understand there is another question on this already, however this is what I coded and wanted to know if this would raise any red flags? Regarding the Character picture exercise located at the end ...
3
votes
1answer
150 views

Slot-machine balance counter

I'm very new to programming and I decided to start my journey with Python. It's my fifth day of learning and decided to try myself out and make a very simple slot machine. I was stuck for hours ...
1
vote
2answers
82 views

Python code to find difference between two dates

I have been working on porting my PowerShell 7 scripts to Python 3.9.5 lately, re-implementing the same logic in a different programming language, keeping what makes it work and removing unnecessary ...
2
votes
4answers
486 views

Contact management program

I have made a simple contact management in C++. It's my second project; I'm pretty sure it can be done more better and I could decrease its runtime, but I just joined the C++ community this year. So ...
4
votes
3answers
178 views

C: Find and Replace in a text file (by a new programmer)

I'm new to C as in I've only studied it for a year and it's my first language. I still don't know how to handle real world code and so would like to see how a real world programmer would write up a ...
3
votes
2answers
45 views
3
votes
1answer
104 views

New in PHP OOP and need opinion am I doing it the right way

I am new to using PHP OOP and decided to start learning by converting something I wrote in procedural PHP. So now I need your opinion and recommendations for my first work. One of the main reasons I ...
2
votes
3answers
124 views

String join function C

...

1
3 4
5
6 7
143