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
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 ...
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 ...
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 ...
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 ...
1
vote
3answers
160 views

MySQLi script to print the name of a user

I made my first script of MySQLi. I have just learnt it from 3rd party website. So, I am not sure I am using functions which are not deprecated or outdated. I should start to practice good scripts to ...
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 ...
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 ...
8
votes
2answers
16k views

Creating a questionnaire

Im making a Python program. It is basically a questionnaire and I was just wondering if there is a shorter way of doing this as at the moment I'm writing out all of the questions in separate functions....
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
47 views

LeetCode 65: Valid Number (C++)

Problem Validate if a given string can be interpreted as a decimal or scientific number. Examples: ...
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: ...
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 ...
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
47 views

Merging Two Bubble Sorted Linked Lists (Python)

I'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge1 creates a new list and does the merging. Other than naming ...
2
votes
1answer
51 views

In-Place Merging of Two Bubble Sorted Linked Lists (Python)

I'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge1 does the merging by creating a new list with maybe \$O(N+M)\$ memory ...
1
vote
1answer
80 views

Single Linked List (Python)

I'm following a tutorial on Single Linked List (SLL). There are so many methods in the code, if you had time please feel free to review any part of it and I can work on it and repost it. I'm ...
4
votes
1answer
136 views

A Basic HashMap (Python)

A hashmap is a data structure that implements an associative array abstract data type using keys and values and has a hash function to compute an index into an array, from which the desired value can ...
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 ...
-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. ...
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. ...
16
votes
5answers
3k views

Program to print a Python list as “a, b, and c”

I am a beginner (with zero Python experience) working through the book Automate the boring stuff with Python. At the end of Chapter 4, the author provides a review problem. I was supposed to write a ...
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
0answers
46 views
+50

List files and folders in current dir with special handling for tty

I want to write a custom ls command to learn rust. This is what I've done as for the version 1.0. This display files and folders in a cyan or white if it's on a ...
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 ...
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 ...
8
votes
2answers
182 views

Rust Echo Command Implementation

I'm just starting out in Rust and I find the concept of ownership confusing so I wrote an implementation of the echo command. I would like to know if I could have ...
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 ...
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) ...
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 ...
-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) ...
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. ...
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 ...
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 ...
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 ...
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 ...
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
61 views

3D Proper Orthogonal Decomposition: C++ implementation

I'm very new to C++ and made this code using the Eigen library to port an old and slow python code which computes the three-dimensional proper orthogonal decomposition (POD) from a set of temporal ...
5
votes
1answer
12k views

Simple Python Pong Game

I'm trying to code a machine learning version of pong in python. So far, all I have is the game without any AI. I personally have very little experience with Python and coding in general, so any ...
4
votes
1answer
49 views

PyTorch Unit-testing in Python

I'm new to PyTorch and I'm writing a unit test for an activation function I'm making. I plan to test against a reference implementation for this function. I want to approach this in a test-driven way,...
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
2answers
2k views

Basic arithmetic calculator

The calculator supports the basic operators (Add,Substract,Divide,Multiply). At the moment, It only works with positive integers I do not validate my user input My division rounds up if it isn't ...
4
votes
2answers
63 views

Breakout clone in pygame

As a guy who started coding a month ago, I would like an honest review of my version of breakout that I created using pygame. ...
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 ...