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

Web-scraping investment fund data into Pandas

Just starting out trying to do some python for data analysis. I am a total beginner and have figure out how to brute force somethings, but I know it is inefficient but don't know how to do it without ...
-2
votes
0answers
42 views

Project Euler # 50 Consecutive prime sum in Python

The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest sum ...
2
votes
1answer
20 views

Algorithm in getting total garnered hours for student using php

Hello I'm calculating now the total garnered hours student get in school using php. (Same concept in getting the total work hours in employee for timesheets) So I have an array $attendance where the ...
2
votes
1answer
194 views

Project Euler # 49 Prime permutations in Python

The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are ...
0
votes
1answer
45 views

Project Euler # 48 Self powers in Python

The series, \$1^1 + 2^2 + 3^3 + \ldots + 10^{10} = 10405071317\$. Find the last ten digits of the series, \$1^1 + 2^2 + 3^3 + \ldots + 1000^{1000}\$. ...
6
votes
3answers
98 views

Evaluating a math expression given in string format

I am currently working on building a calculator using Java and JavaFX to practice my coding skills. I wrote the following methods to evaluate a given expression. What can I improve? Is there ...
0
votes
0answers
39 views

Project Euler # 44 Pentagon numbers in Python

Pentagonal numbers are generated by the formula, \$P_n=\frac{n(3n−1)}{2}\$. The first ten pentagonal numbers are: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145 ...
-3
votes
0answers
23 views

how do i write a header file for a program that is supposed to preform a binary search? [on hold]

// this program is for a binary search i need help specifically for building a header file //ive been struggling with this program for a few days. // any suggestion? thank you ...
-1
votes
0answers
34 views

Project Euler # 43 Sub-string divisibility in Python

The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a rather interesting sub-string divisibility property. Let \...
1
vote
0answers
27 views

Project Euler # 42 Coded triangle number in Python

The nth term of the sequence of triangle numbers is given by, \$t_n = \frac{n(n+1)}{2}\$; so the first ten triangle numbers are: ...
1
vote
0answers
33 views

Project Euler # 38 Pandigital multiples in Python

Take the number 192 and multiply it by each of 1, 2, and 3: 192 × 1 = 192 192 × 2 = 384 192 × 3 = 576 By concatenating each product we get the 1 to 9 pandigital, 192384576. We will ...
2
votes
1answer
27 views

Reading image files asynchronously and displaying them on the page

I am trying to display images from a folder in my project using the "fs" module with NodeJS. I need to read all images in a directory and run them in a loop for them to be displayed. I was able to do ...
4
votes
2answers
51 views

First Python program: pick and display alien characteristics

This is my first Python program and all it does is print out a description of the specific "Alien Class" that the user inputs. Looking for tips and pointers and what I can do better and what I am ...
-1
votes
1answer
28 views

Project Euler # 37 Truncatable primes in Python

The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can ...
1
vote
1answer
22 views

Statistical function which computes the average work time in different months

It's a task from a Ruby-course, in which I'm currently enrolled: Ruby Course - Page Precisely it's one of the assignments for the first week. Following idea: Your are given a list in which finished ...
1
vote
1answer
53 views

Project Euler # 36 Double-base palindromes in Python

The decimal number, 585 = 1001001001 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note ...
3
votes
1answer
92 views

Project Euler # 35 Circular primes in Python

The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, ...
1
vote
1answer
57 views

Project Euler 34 # Digit Factorials in Python

145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are not ...
0
votes
1answer
47 views

Project Euler # 30 Digits fifth power in Python

Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: \$1634 = 1^4 + 6^4 + 3^4 + 4^4\$ \$8208 = 8^4 + 2^4 + 0^4 + 8^4\$ \$9474 = 9^4 + ...
2
votes
0answers
65 views

Page-by model of data output and search results with values for UI

This is my first experience of designing classes with inheritance. I would like to get feedback on the interaction between the presented classes. It is unlikely that this code will seem complicated. ...
2
votes
1answer
26 views

Naive implementation of sort inplace

I had the following assignment for the Python 101 course I'm taking in my university. ...
3
votes
2answers
35 views

Checking the strength of a password using regexes

I'm a beginner in Python and I made a password checker. I'm following these rules: I have to use regex password must be at least 8 characters must have at least one lower case character must have at ...
16
votes
5answers
2k views

Project Euler # 25 The 1000 digit Fibonacci index

The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 ...
2
votes
2answers
23 views

Project Euler # 24 Lexicographic permutations in Python

A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we ...
3
votes
1answer
65 views

Sim game and it's my first program

This is my first program and I had fun making it and learning new things! Please let me know what I can do to improve this code! The objective of the game is to survive as long as possible. You have ...
4
votes
1answer
35 views

Project Euler # 22 names scores in Python

Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. ...
1
vote
0answers
78 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 ...
1
vote
1answer
42 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 ...
3
votes
1answer
36 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 ...
4
votes
1answer
35 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 ...
4
votes
2answers
56 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 ...
9
votes
2answers
107 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: <...
1
vote
0answers
49 views

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

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 ...
2
votes
0answers
126 views

Attendance using biometrics in php

I'm currently developing a system for attendance using biometrics in PHP. ...
6
votes
0answers
34 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 ...
3
votes
0answers
24 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 ...
3
votes
2answers
102 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 ...
6
votes
3answers
772 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 ...
3
votes
1answer
42 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
27 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. ...
5
votes
3answers
217 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/...
5
votes
1answer
63 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 ...
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

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? ...
2
votes
2answers
142 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
57 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
31 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 ...
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 ...
1
vote
2answers
69 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 ...