The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
18 views

Magic Square with Five Methods (Python)

Problem Write a program to return a boolean if an input grid is magic square. A magic square of order \$N\$ is an arrangement of \$N^2\$ distinct integers in a square such that the \$N\$ numbers in ...
2
votes
2answers
23 views

Caesar Cypher Implementation

I am learning C# and for an experiment I tried implementing the Caesar Cypher cryptography method which just offsets every character of the string n characters. How can I make this simple program ...
2
votes
0answers
13 views

Projects planner interface on PyQt5

My task was : Create a Python application to display the active status of your IT project. Everyone the project has its own unique number that is generated at the stage of receipt project into the ...
5
votes
2answers
174 views

Magic Square (Python)

Problem Write a method to return a boolean if an input grid is magic square. A magic square is a \$NxN\$ square grid (where N is the number of cells on each side) filled with distinct positive ...
1
vote
1answer
70 views

Capitalize the First Letter of Words in a String (JavaScript, Python)

Problem Write a function that accepts a string, capitalizes the first letter of each word in the string, and returns the capitalized string. Examples ...
1
vote
1answer
48 views

Anagram (Python, JavaScript)

Problem Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is a string that contains same characters ([A-Za-z0-9]) and the order of ...
-1
votes
0answers
11 views

Create bar chart with descending order to missing data [on hold]

Tried to create a bar chart with descending order to show continents with most missing HIV data. ...
3
votes
1answer
44 views

Converting an input of space delimited integers to a list

tablou = input("Enter values delimited by space: ") b = tablou.split() t = [] # initial list with int() contents for l in b: r = int(l) t.append(r) I ...
2
votes
1answer
47 views

LeetCode 65: Valid Number (C++)

Problem Validate if a given string can be interpreted as a decimal or scientific number. Examples: ...
3
votes
1answer
33 views

A class and a function to create and light up buttons in PyGame

This is my first ever try at making reusable code. The function makes use of two images to give the illusion of turning on and turning off a button in pygame. I would like to know what would you do ...
2
votes
1answer
40 views

Beginner tic-tac-toe implementation

I finally made tic tac toe as a beginner(took a month and a bit) and I want to know if I made things more complicated than they should. It seems like a lot of code for a simple game but I'm not sure. ...
4
votes
3answers
593 views

LeetCode 65: Valid Number (Python)

Problem Validate if a given string can be interpreted as a decimal or scientific number. Some examples: ...
2
votes
1answer
41 views

Russian Peasant Multiplication Algorithm

For university, we have just started to learn C++ as a language, and one of our challenges to do in our spare time is to write an algorithm for 'Peasant multiplication'. In the challenge, we have been ...
1
vote
1answer
41 views

MaxProductOfThree in C#

This is my solution for the MaxProductOfThree from codility, it scores 100%, but I'm not a fan of the if if if structure it has going on. Task description ...
4
votes
3answers
385 views

Program to print the multiple occurrence of numbers in a list

I wrote this program to print how many times each number occurs in a list: ...
2
votes
3answers
105 views

Split array into chunks (JavaScript, Python, PHP)

Problem Given a list and an integer chunk size, divide the list into sublists, where each sublist is of chunk size. Codes Just for practicing, I've coded to solve the problem using JavaScript and ...
2
votes
1answer
59 views

Rock Paper Scissors Beginner Python Game [on hold]

I recently made this game for rock, paper, scissors in Python 3. Everything works as intended, but I am sure this is not an optimal way of accomplishing this task. Wondering if there is any beginner ...
-6
votes
0answers
35 views

Can't replicate code with the same logic [closed]

The code that gets the right value (Utility percentage) ...
-3
votes
0answers
34 views

code works but shows wrong values [closed]

Hi I am new to programming while trying to execute this script the input file has this form (in this case they are called nohd*.txt files) ...
4
votes
2answers
694 views

Palindrome and Reverse a String Problems (JavaScript, Python)

Problem 1 Given a string, the task is to reverse the string and return a reversed string. Problem 2 Given a string, return true if the string is a palindrome or false if it is not. Code Just for ...
1
vote
0answers
29 views

Size out of limits in array made with malloc [closed]

I'm applying what I learned in statistics class to a program to calculate everything automatically, but encountered an unexpected 'mistake' in my code. I say unexpected, because it's not the first ...
5
votes
1answer
45 views

Log Text Messages In Google Sheets

This script sends and receives text messages and logs responses in a google sheet. Demo Gif here: https://github.com/RyGuy96/HealthTracker. I'm a self-taught beginner coder just starting my formal ...
5
votes
1answer
38 views

Simplified Blackjack in Python

I just started learning python a couple of weeks back from and like many others here, I too seek feedback on my simplified Blackjack game. I would like to know if the code could have been more elegant/...
4
votes
1answer
25 views

Bash script to reconfigure the screen orientation when entering or exiting tablet mode

I'm writing a bash script for my tablet laptop to flip the screen depending on a file in Manjaro Linux. My current script is the following: ...
4
votes
1answer
58 views

Creating an inverted index from text documents

I am working on an information retrieval project, where I have to process a ~1.5 GB text data and create a Dictionary (words, document frequency) and posting list (document id, term frequency). ...
4
votes
2answers
63 views

JavaRPN (Updated)

I have previously worked on this program in this question, and have gotten some very good answers and help! Now, I have done some more work on the program, and would love if you could give me honest ...
19
votes
4answers
2k views

Matrix class in C#

I've been learning C# during my free time in the past months; before that, I was mostly writing Java, so the transition hasn't been too hard, but I've never had my code reviewed or read by someone ...
8
votes
1answer
800 views

Favorite Game List utilizing vectors and iterators

So in learning c++ I have to make a little program that makes a game list that can add games to the list, remove games, and display the list, and it has to use vectors and iterators, so I made the ...
3
votes
1answer
51 views

Simple winform that randomizes images in a picturebox

I wrote this code for a simple app that gives us random images. The code works, but I feel like I'm doing something wrong. And one thing I would love to know is instead of grabbing from a folder ...
2
votes
1answer
35 views

Reading a text file, manipulating it and saving it to a mongo database

We have an upcoming project at work which is going to require working with express.js. I have no prior experience with node.js, so I thought I'd try and do something aside from some courses. Are there ...
6
votes
1answer
64 views

Optimizing a raycasting/voxelspace algorithm in Pygame

In the past three days, I've been developing a simple raycasting algorithm. I've made the renderer work as I'd like to. However, it is extremely slow (5 frames per second) because of two things (as ...
7
votes
1answer
55 views

Rust echo implementation that supports command line options

I rewrote echo from the manpage to learn Rust, and got the following: ...
5
votes
1answer
46 views

Image tracking code using opencv in python

I wrote this code to track small moving objects falling down a chute. The code works buts runs too slowly: using 60 FPS 1920 by 1080 footage the code only runs at about 10 FPS. The problem there is ...
5
votes
1answer
70 views

Educational implementation of SHA256 in Rust

A few weeks ago I decided to have a look at the Rust programming language. After a few standard exercises I chose to try to implement the SHA256 hashing algorithm, because why not. The algorithm's ...
7
votes
3answers
142 views

Extremely basic login system in console

This is my first C# project. I still am a noob to programming, and while I'm happy I carried out this project, I know that my code needs A LOT of improving and that's why I posted it here. This code ...
4
votes
1answer
56 views

Rendering the AuthorName using the DOMParser to read XML

I need to concatenate the LastName and Initials and all of that authors affiliations. Is there a better way or faster way to do ...
17
votes
4answers
2k views

Hero battle game

This is my first attempt at OOP/classes: a game where you will select a character and use attacks and abilities to defeat the enemy character. I have a few specific questions: I was told that having ...
6
votes
1answer
57 views

Flask application for buying stocks

I wrote three Flask views below. First view input stock code Second view get the stock details (name, price) of the stock by using 3rd party api get the balance cash of DB and show to the view ...
4
votes
1answer
57 views

99 beers song in Rust

I'm learning Rust. I find it sometimes confusing when compared to other programming languages, especially when dealing with strings and slices. Her's an implementation of the 99 beer song that I've ...
4
votes
1answer
88 views

Sanitize and build data structure from Consul configuration

I have a piece of working code that takes some strings from Consul configuration exports, sanitizes them a little and converts them into valid json and/or hocon structures. While I am iterating over ...
7
votes
2answers
880 views

Displaying characteristics of the Hero in a console game

I am beginner in OOP. And i want you to analyze my piece of code and give me some recommendations. My task was : RPG game give a chance to choose race of Hero : Argonian, Breton, altmer, nord. In ...
5
votes
2answers
85 views

Fantasy Game Inventory - Automate the Boring Stuff with Python

Below is my code for the Fantasy Game Inventory problem from Chapter 5 of Automate the Boring Stuff with Python. Is there anything I can do to make it cleaner or more efficient? The code starts out ...
3
votes
2answers
95 views

Implementation of tree with different node types and faux-polymorphism in C

I'm currently learning C by working on my first project. It's a calculator with a parser that transforms input into an operator tree. These trees consist of nodes of different types: Operators (inner ...
1
vote
0answers
7 views

Command-line implementation of Mastermind (Ruby)

I just finished this command-line implementation of the Mastermind board game that allows two players to play against each other. I'm fairly new to Ruby, but I think I did a decent job with this. ...
8
votes
2answers
125 views

My third game - Poker hand strength analyzer

I'm writting this poker hand evaluator and it's really coming along. But, as you can see I repeat myself many times and I would love to know what's your thought process when you're repeating yourself? ...
4
votes
1answer
46 views

C Garbage Heap aka simplest memory management tool

The idea is to init garbage heap in the beginning of main, use gmalloc, gcalloc and ...
1
vote
0answers
38 views

Codility's GenomicRangeQuery solution in C#

I've been learning C# for a few months now, and I've done some basic things in java last year. I made a solution for the problem the title states, this is the task description. Task description ...
5
votes
1answer
464 views

Beginning of a GUI Python solution to Andrew Ng's ML week 3 excercises

Coursera has a course for beginning Machine Learning and the code is written in Octave. This is the beginning of a solution to the week 3 exercises but written in python. Instead of a terminal app I'...
5
votes
4answers
112 views

Morse Code Converter in C

I'm learning C so I thought to apply it to miniproject on reddit. The smorse function takes in a string and spits out some morse code. It works if you supply the function with only lowercase letters. ...
5
votes
1answer
54 views

BitBoard class In TypeScript for chess logic

I'm working on writing a Chess Logic Library in JavaScript for learning purposes and was wondering how good these two slightly different implementations of a BitBoard are. The first stores the board ...