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
1answer
19 views

Project Euler # 20 factorial digit sum in Python

n! means n × (n − 1) × ... × 3 × 2 × 1 For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the ...
1
vote
0answers
39 views

Object-oriented calculator

I have solved an assignment (Exercise 3) from the MOOC Object-Oriented programming with Java, part II, but I'm not enrolled in said course. Assignment Summary: Make a simple calculator. You ...
0
votes
1answer
14 views

Project Euler # 21 amicable numbers Python

Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b ...
4
votes
0answers
14 views

Wavefront 3D Obj parser/viewer

For learning Rust I decided to make a 3D .obj viewer. I wrote a simplified OBJ parser without materials that only supports triangles. Considering I'm completely new to Rust and don't really know ...
6
votes
1answer
86 views

Implementing Linked lists in Python from scratch

After finishing my ds and algorithms course I wanted to implement what I've learned through the semester so here is my try for Linked lists, both regular (one way) and double one (two way). code: <...
4
votes
2answers
51 views

Arduino project to indicate soil moisture using LEDs

I've recently started going through the Head First C book. I'd like to get up to speed in terms of writing good, idiomatic, modern C. I have read the first few chapters of the Modern C book too but ...
5
votes
4answers
135 views

First completed webpage

Here is what the site looks like with the icons/images: ...
3
votes
2answers
100 views

Text based fighting simulator in Python

This is my first large project, a text based fighting simulator. It is very clunky, do you have any ideas on how to make the code better? and how to make the code not get printed at once ...
1
vote
0answers
47 views

Making text based Blackjack game in Java. Can't figure out how to deal with Ace(1/11) and Splitting [on hold]

I've been learning java for about a year in University and decided to start this Blackjack game which I can hopefully animate into a full app in the future, although I'm still working on the ...
6
votes
0answers
30 views

DSL for Makefile generation for dotfiles using symlinks

As I explain in my rant, I have been searching for a replacement to hand-crafted POSIX-make-compatible makefiles to manage my dotfiles (which use symlinks). I ...
1
vote
0answers
38 views

Table class to fill array structure with values

The code creates a table and adds rows and columns. Does it make sense to write the code like this? Would you design it differently? Is there a better OOP approach to this? ...
4
votes
1answer
60 views

Golang matrix package

I developed a small package to do matrix math. I just learned Go so I may have done it wrong. ...
6
votes
1answer
469 views

Android Tetris App Design

Recently I have finished my first bigger Android project. I made a little Tetris App. Here is a picture of my app in emulator: My Tetris has following functions: fast drop down play tetris music ...
3
votes
0answers
22 views

Swift iOS app for showing motivational quotes, with multiple screens

I'm one month into self-learning Swift, and I would like some advice to improve my coding skills. I have listed 2 situations that I think I need to improve. I'd like some feedback focusing on my use ...
5
votes
3answers
187 views

Simple Number to Words using a Single Loop String Triplets in JavaScript

I have extensively reviewed 2 old articles on the subject: https://stackoverflow.com/questions/14766951/convert-digits-into-words-with-javascript and https://stackoverflow.com/questions/5529934/...
6
votes
3answers
750 views

Password maker in C#

I need to generate semi-complex throw-able passwords (just one use) in my application. I want it to be: at least 8 characters long; contains at least 1 digit, 1 [a-z] char, 1 [A-Z] char; I generate ...
-1
votes
0answers
23 views

Counting co-occurence of a file encoded in UTF-8 [closed]

I need to write a script that can count co-occurences in a UTF-8 encoded file. The length of the co-ocurence is between 2 to ...
5
votes
1answer
62 views

Text-based fighting game in Python 3.0

I have began to practice Python after a couple of years and for my first Project, i decided to make a fighting/rpg-like game with different characters. So far, I am only familiar with loops and ...
7
votes
1answer
155 views

Python code to identify structure of a text file

We have a department in our org that generates a lot of data in flat files, all with different formats. We are now trying to sort this data out and load into a database. As step 1, I am trying to ...
6
votes
2answers
6k views

Palindrome using stack

I recently started learning Java, algorithms, and data structures. I am trying to check if a string is palindrome. I would like a review to see where and how I could improve. ...
2
votes
0answers
30 views

Ruby price calculator for groceries

I am good at logic and most of the time I write working code. But I want to learn writing code which follows best practices and is very efficient. I tried to implement some of them in my code but it ...
2
votes
0answers
21 views

Basic network layer for a JSON API client

Just looking for some feedback/ways to improve this basic networking layer written in Swift. I'm still learning, please elaborate with as much detail as possible. ...
-2
votes
1answer
42 views

Python Count on if Loops [closed]

I would like to make this super beginner factoring calculator in Python3 without the use of lists or other data structures. How do I get the count to successfully number the iterations of the print ...
4
votes
3answers
498 views

Pet hotel system in Python

I am doing a simple application for a pet hotel. I have almost finished but I'm still new on Python and I would like to see if there is a more efficient way to write this, whilst supporting both ...
9
votes
3answers
4k views

Parsing the lsblk output

I am a Python beginner learning Python 3. I have written two small functions that parse the lsblk output and return Linux physical and logical disks. Here is the first function: ...
6
votes
4answers
1k views

Parse source code of the RAPID robot-automation language

I am new to C, and I have very little formal education on programming (Although I am currently in college). I work as a Robot Automation technician, and me and my team are required to document a lot ...
-2
votes
1answer
53 views

Java rotate square matrix by 90 degrees [closed]

I am a computer science freshman and I tried to implement the algorithm to rotate a matrix by 90 degrees. My code only works for a 3x3 matrix because I have not been able to apply the pattern to every ...
1
vote
2answers
66 views

Simple subnet calculator and parser

I have started to learn Java for the past 20 days with no prior coding/comp science experience. My brother gave me an idea to make a subnet calc/ping tool to enhance my knowledge and mentored through ...
5
votes
4answers
23k views

Rock, Paper, Scissors Game in Python

This is the biggest program I have ever made. I created a Rock Paper Scissors game. It asks you if you want to play, takes your input, compares it with the random computer input, gives you the outcome,...
9
votes
5answers
766 views

Deck of cards with shuffle and sort functionality

Going through Head First C#'s Chapter 8: Enums and Collections, I learned about List<T>, as well as IComparable<T> ...
2
votes
1answer
60 views

Shooter game simulation

The program is a little code about guns with user input. The program is a perfect representation of the beauty of functions. What do you think of it? ...
4
votes
3answers
2k views

Palindrome test

This is some code that determines if a string of characters is a palindrome or not. My professor says that there is a performance issue with the program, but I can't quite put my finger on it. Can ...
2
votes
2answers
136 views

PDF page & word count, recursive searching of directory tree, output to excel

I wrote this program as part of a work-related problem but with a focus on improving my Python skills. The program was needed to do a word count PDF files. The problem was there were a large number of ...
4
votes
2answers
49 views

Regex Version of strip()

This problem is from Automate The Boring Stuff using Python - Chapter 7. Write a function that takes a string and does the same thing as the strip() string method. If no other arguments are ...
4
votes
0answers
34 views

Border Radius Preview Tool

I am running through an app idea to help improve my knowledge of Javascript. The code attached performs the following: Performs a regex on the input field to check it is value 0-9 If not, it clears ...
1
vote
0answers
25 views

Golang and Gin framework: best practices to connect to Postgresql

I come from this question. Project A very simple project with Gin framework with an endpoint to return a list of users based on their score. Structure ...
3
votes
2answers
100 views

Calculate total water drunk in a day

I would like to know how I might improve my code? I just started coding and liking it a few days ago so I am quite new to this whole world... The objective is to calculate the amount of water one has ...
3
votes
3answers
91 views

Compute binary sum with Python 3

I tried to make a function able to compute the binary sum. Binary numbers are passed as list composed of 1 and 0, like ...
2
votes
1answer
60 views

A heap-allocated texture class for a console renderer

I am working on a console renderer and I want a heap-allocated dynamic texture class. Since I am quite new to C++, I just want to check the memory management, if I destroy all pointers correctly etc. ...
4
votes
4answers
1k views

Strong Password Detection in Python

This is a problem from "Automate the boring stuff". Write a function that uses regular expressions to make sure the password string it is passed is strong. A strong password is defined as one ...
1
vote
1answer
85 views

Python: Heapsort

I am beginner in python and I am learing about syntax and other functions in python by writing Algorithm and Data Structure programs. How can this code be improved? ...
3
votes
1answer
79 views

Random item generation system to be used in a roguelike

New to programming with the goal being to create my own roguelike. I am mostly interested right now in creating my item generation system. I want the code to create a random item that can then be used,...
1
vote
0answers
49 views

Python: Quick Sort

How to improve this code? In C++ we use templates to write function for all data types. How to write such code in python? ...
2
votes
2answers
67 views

Create User Class

Create a user class with id, name, age. Write a function to get users older than age 20. Group all users with same age and increment users age by 3 Is there a cleaner way to write this? Any comments ...
7
votes
1answer
984 views

Log probe requests of WiFi devices

I developed a program that collects probe requests from WiFi devices. It already works but I think that a programmer can improve it. ...
4
votes
1answer
85 views

Find website URLs that begin with http:// or https://

This is a problem from Automate the Boring Stuff from "Pattern Matching with Regular Expression". I am a beginner in Python and the purpose of this program is to match urls which start with ...
2
votes
1answer
36 views

Basic input system for a few form fields

I am attempting to port a linear function that I designed in a spreadsheet into HTML and Javascript. It's based on linear least squares where I have to take a Matrix and multiply it by its ...
1
vote
2answers
86 views

My Sal's Shipping challenge on Codecademy

This is my attempt on the Python 3 Sal's Shipping challenge on Codecademy (Challenge Link (instructions in the link)). I'd really appreciate anyone to take the time to review my code. I'm a very new ...
2
votes
1answer
77 views

Project Euler #3 with Python

I tried to solve some Euler's problems, this is the solution I found for problem #3 with Python. The problem asks: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor ...
4
votes
2answers
80 views

Print a pattern of text based on a line from an Excel file

I started to learn Python not long ago to automate certain tasks I work on. I want to optimize a script I wrote that takes a line in an Excel file and prints a pattern of text based on this line's ...