All Questions
Tagged with functional-programmingpython
10 questions
2votes
1answer
121views
Newspaper Bill Calculator CLI with Python (1 of 3, Core)
Code is posted after explanation. Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused. Post 2 of 3, CLI: Newspaper Bill ...
3votes
2answers
281views
Sequence processing problems
Problem 1: Sum the even numbers for the first n fibonacci numbers Solution: ...
1vote
2answers
107views
UPDATE on Newspaper Bill Calculator CLI with Python (1 of 3, Core)
Code is posted after explanation. Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused. Post 2 of 3, CLI: UPDATE 1 on Newspaper ...
10votes
1answer
1kviews
Generate iCalendar .ics files with events for astrological aspects
I'm relatively new to Python, coming from a deep C++ background. I'm mostly looking for feedback on how to make my code more idiomatic/pythonic, but I would welcome and appreciate any and all other ...
8votes
3answers
539views
Story-based adventure with functions and relationships
This is a story-based adventure program I coded by myself (forgive the length). It took a long time but it was fun. It includes loading times, changes in relationships, relationship levels, storyline ...
8votes
1answer
3kviews
Functional programming in Python: 2048 merge functions
I've written the core functions for a basic 2048 game. I know Python isn't a functional programming language, but I like the "functional style" (easier to maintain, simple to understand, more elegant),...
7votes
3answers
26kviews
Hailstone Sequences in Python
For the problem given: Douglas Hofstadter’s Pulitzer-prize-winning book, Gödel, Escher, Bach, poses the following mathematical puzzle. Pick a positive integer \$n\$ as the start. If \$n\$ is ...
5votes
1answer
618views
Yet another Pascal triangle in Python written in functional programming pattern [closed]
Here is my implementation of a Pascal program, which is used to print an n-order Pascal triangle. This is actually an exercise I came up with to familiarize myself with Python's Functional Programming ...
4votes
1answer
164views
Functools extension library
I wrote a utility library inspired by functools that adds some common operations on functions I frequently use in my projects. As usual I'd appreciate any feed back....
1vote
1answer
275views
How to improve this functional python trial division routine?
The following functional program factors an integer by trial division. I am not interested in improving the efficiency (but not in decreasing it either), I am interested how it can be made better or ...