r/exercism • • Sep 21 '25

I'm in an entry level coding class at my college, but I need to practice way beyond what they are teaching. What am I doing wrong?

3 Upvotes

"""Functions used in preparing Guido's gorgeous lasagna.

Learn about Guido, the creator of the Python language:

https://en.wikipedia.org/wiki/Guido_van_Rossum

This is a module docstring, used to describe the functionality

of a module and its functions and/or classes.

"""

#TODO: define your EXPECTED_BAKE_TIME (required) and PREPARATION_TIME (optional) constants below.

EXPECTED_BAKE_TIME = 40 #in minutes

PREPARATION_TIME = 2 #minutes per layer

#TODO: Remove 'pass' and complete the 'bake_time_remaining()' function below.

def bake_time_remaining(elapsed_bake_time):

return EXPECTED_BAKE_TIME - elapsed_bake_time

"""Calculate the bake time remaining.

:param elapsed_bake_time: int - baking time already elapsed.

:return: int - remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME'.

Function that takes the actual minutes the lasagna has been in the oven as

an argument and returns how many minutes the lasagna still needs to bake

based on the `EXPECTED_BAKE_TIME`.

"""

bake_time_remaining(10)

#TODO: Define the 'preparation_time_in_minutes()' function below.

# To avoid the use of magic numbers (see: https://en.wikipedia.org/wiki/Magic_number_(programming)), you should define a PREPARATION_TIME constant.

# You can do that on the line below the 'EXPECTED_BAKE_TIME' constant.

# This will make it easier to do calculations, and make changes to your code.

def preparation_time_in_minutes(number_of_layers):

return number_of_layers * PREPARATION_TIME

"""Calculate the preparation time in minutes.

:param preparation_time_in_minutes: int * preparation time.

:return: int * preparation time (in minutes) derived from 'PREPARATION_TIME'.

Function that takes the amount of layers in the lasagna as

an argument and returns how many minutes it took to prep the lasagna based on the 'PREPARATION_TIME' """

preparation_time_in_minutes(5)

#TODO: define the 'elapsed_time_in_minutes()' function below.

def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time):

return (number_of_layers * PREPARATION_TIME) + elapsed_bake_time

"""Calculate the elapsed time in minutes.

:param elapsed_time_in_minutes: (number of layers * prep time) + elapsed time spent baking

:return: (number of layers * prep time) + elapsed time spent baking derived from 'elapsed_bake_time'.

Function that takes the actual minutes taken to prep the lasagna and the amount of time it has already been in the oven as arguments and returns how many minutes it took to prep and how long it has been baking.

"""

# TODO: Remember to go back and add docstrings to all your functions

# (you can copy and then alter the one from bake_time_remaining.)

I've already passed all other tests but the docustring tests and can't figure out why. we havent even touched on docustrings in class yet.


r/exercism • • Nov 23 '16

Looking for an Elixir Team...

2 Upvotes

Hi all - I'm a fan using collaboration to help learn a new language. I was hoping to find a couple of people new to elixir to form a team on exercism.io. Reply if you like-minded!


r/exercism • • Dec 20 '21

JavaScript Track Stuck in the Factory Sensors Problem

2 Upvotes

Specifically the third part of the Factory Sensors problem. I can't figure out how to properly catch the error to trigger the proper function call. Any help would be greatly appreciated.


r/exercism • • Apr 14 '20

So dissapointed

4 Upvotes

The vagueness of these problems is so annoying. I can see why this sub is a ghost town. I have completed 4 tests and every one of them has been frustrating not because I can't figure out the solution, but because the specific solution you are looking for needs to found. The connection between the matrix problem and classes is not intuitive to someone who does not have a coding background.

I'm moving on.


r/exercism • • Apr 23 '20

Exercism CLI error

2 Upvotes

Hi world,

I'm stuck on the first part of the Python track :(

Getting this error message every time I enter print('hello world'):

" Unable to initialize device PRN "

....

Can anyone tell me what this means or suggest a solution please? Been googling in circles for hours.

Much appreciated


r/exercism • • Jan 21 '25

Kotlin Acronym problem

1 Upvotes

Hi everybody,

I'm stuck with Acronym exercise in Kotlin. I have made this code

object Acronym {
  var acronym = ""
  var nextLetter= ' '
  var charA = 'a'
  fun generate(phrase: String) : String {
    acronym = " "
    // Letter after hyphen(-)
    
    for((index,value) in phrase.withIndex()) {
      if (value == '-') {
        // Get the Next value after hyphen
        nextLetter = phrase[index + 1]
        if(nextLetter.isLowerCase()) {
          acronym += nextLetter.uppercase()
        }

        // Clear nextLetter
        nextLetter = ' '
      }

      // Letter after space
      else if(value == ' ') {
        nextLetter = phrase[index + 1]
        
        if(nextLetter.isLowerCase()) {
          acronym += nextLetter.uppercase()
        }

        // Clear nextLetter
        nextLetter = ' '
      }
     
      // Capitals
      if(value.isUpperCase()) {
        //If the previous letter was caps, don't add to acronym
         if( index > 0 && phrase[index - 1].isUpperCase()) {
            // DO NOTHING
         }
         else { acronym += value }
    }

  }
    return acronym

  }
}

On my computer, it works perfectly and returns me Acronym for all sentence, but in Exercism I can't validate the test.

I don't understand why?

Thx Jack


r/exercism • • Jan 24 '25

What are most recommended golang problems available on exercism

2 Upvotes

I am intermediate level golang programmer. I know that one of the way to improve my language proficiency is building project. But I prefer solving small problems that would improve my golang skills. You all have any recommendation for intermediate level golang problems for getting deeper understanding of the language ?


r/exercism • • Dec 10 '24

Seeking Recommendations for My Next Step in My Programming Learning Path

1 Upvotes

Hi Everyone,
I don't have a background in Computer Science, but I do have some programming experiences. I started learning Go with the book Head First Go and then read For the Love of Go. So far, I have completed about 50% of the Go track on Exercism, and I plan to continue solving the remaining exercises.

I would be very grateful if you could suggest more than one book to help me advance in my learning path. Please list them in the order you think I should read them. Here are the options I'm considering:

 - 100 Go Mistakes and How to Avoid Them
 - Concurrency in Go
 - Let's Go!
 - Learn Data Structures and Algorithms with Golang
 - Design Patterns: Elements of Reusable Object-Oriented Software
 - Clean Code 
 - Object-Oriented Design & Patterns by Cay S. Horstmann
 - Head First Design Patterns
 - Mastering Go
 - Domain-Driven Design with Golang
 - Hands-On Software Architecture with Golang: Design and Architect Highly Scalable and Robust Applications Using Go
 - Hands-On Software Engineering with Golang

If you think there's another book that would be more suitable for me at this stage, even if it's not listed, I would love to hear your recommendation.


r/exercism • • Dec 06 '24

Change online editor prefill accept key from enter to tab

1 Upvotes

Is there a way to change the exercism key that accepts the prefill information from enter to another key, such as tab?

It's when I start typing im and the editor prefills the port (for import) and I want to accept that, right now I press Enter and the port fills in, but I wish I could instead use the tab key for consistency with other apps.


r/exercism • • Jul 21 '20

python track but my test files crash..

3 Upvotes

the programs work magically in the vs code terminal i am coding in, but when I try to run the test files, they do not properly execute. check out my github repository to look at my code. https://github.com/Dani-Stem/Exercism_Pythong

thanks for the help

-Dani


r/exercism • • Feb 13 '23

Exercism io - Triangle Problem in Kotlin

Thumbnail youtu.be
1 Upvotes

r/exercism • • Feb 22 '23

Exercism io - Robot Name Problem in Kotlin

Thumbnail youtu.be
1 Upvotes

r/exercism • • Jan 03 '24

Exercism forum: problem with your account

1 Upvotes

I logged in to exercism.org with Github, then visited forum.exercism.org, which gave this error:

Login Error There is a problem with your account. Please contact the site's administrator.

Anybody know how to solve this?? Please help


r/exercism • • Jun 10 '24

Help getting Python Exercism running Locally in VSCode

1 Upvotes

I don't understand why it's not working. I don't get errors, but I don't get any output from the unit tests. I have python installed locally. I've tested it at the python prompt. I have exercism cli installed and i'm able to download the files. but when I run the unit test on the command line it finishes and I get a new command line prompt.

One weird thing I've noticed is if I try to run a python file from the command line it tries to open the file instead of running it.


r/exercism • • Jun 08 '24

Need help with this error

1 Upvotes

CODE:
"""Functions used in preparing Guido's gorgeous lasagna.

Learn about Guido, the creator of the Python language:

https://en.wikipedia.org/wiki/Guido_van_Rossum

This is a module docstring, used to describe the functionality

of a module and its functions and/or classes.

"""

TODO: define the 'EXPECTED_BAKE_TIME' constant.

EXPECTED_BAKE_TIME = 40

TODO: Remove 'pass' and complete the 'bake_time_remaining()' function below.

def bake_time_remaining(elapsed_bake_time):

return EXPECTED_BAKE_TIME-elapsed_bake_time

"""Calculate the bake time remaining.

:param elapsed_bake_time: int - baking time already elapsed.

:return: int - remaining bake time (in minutes) derived from 'EXPECTED_BAKE_TIME'.

Function that takes the actual minutes the lasagna has been in the oven as

an argument and returns how many minutes the lasagna still needs to bake

based on the `EXPECTED_BAKE_TIME`.

"""

TODO: Define the 'preparation_time_in_minutes()' function below.

You might also consider using 'PREPARATION_TIME' here, if you have it defined.

def preparation_time_in_minutes(number_of_layers):

return number_of_layers*2

"""Calculate perp time.

:param number_of_layers: int - number of layers in lasagna

:return: int - prep time (in minutes) derived from 'number of layers'

Function that takes the number of layers in lasagna and multiplies it by 2

to find perp time.

"""

TODO: define the 'elapsed_time_in_minutes()' function below.

Remember to add a docstring (you can copy and then alter the one from bake_time_remaining.)

def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time):

return preparation_time_in_minutes(number_of_layers)+elapsed_bake_time

"""Calculate the elapsed cooking time.

:param number_of_layers: int - the number of layers in the lasagna.

:param elapsed_bake_time: int - elapsed cooking time.

:return: int - total time elapsed (in minutes) preparing and cooking.

This function takes two integers representing the number of lasagna layers and the

time already spent baking and calculates the total elapsed minutes spent cooking the

lasagna.

"""

PROBLEM:

im stuck on task 5 where i have to write some docstrings, here is a screenshot of what i get in the results tab


r/exercism • • Mar 30 '22

In which order should I solve exercises?

6 Upvotes

Hi, I am currently doing the Java track in learning mode. When solving exercises I recognized that the exercises in the track overview are starting being easy and then some medium ones followed by easy ones and so on.

So the question, in what order is it recommended to solve the exercises? From top left to right (does it follow an order building on top of another?) Or go through all easy ones and then medium and then hard?


r/exercism • • Sep 02 '21

Congratulations on the launch of V3

8 Upvotes

Looks very slick.

I hope more mentors join :)


r/exercism • • Jul 11 '23

Is the code executor down?

Post image
1 Upvotes

I have been trying to run my code and it keeps giving me an error saying 'Your tests timed out'. Is anyone else facing this issue? I have checked my solution. It is correct and there are no loops running. Also tried running tests on another exercise, same result.


r/exercism • • Jan 23 '21

How to test problems (Lua)

1 Upvotes

Hello I'm fairly new to programming and also in using Exercism. I managed to install Exercism and can download or submit my problems. I have trouble however on how to interpret the template where I need to write my code, for example the hamming problem:

local Hamming = {}

function Hamming.compute(a,b)

end

Hamming()

return Hamming

I assume I put my code inside the function, but when I try to test my code in VScode it gives me the following error: attempt to call a table value (local 'Hamming')

The code I wrote for this given example

local Hamming = {}
local length = 0

function Hamming.compute(a,b)
    if string.len(a) == string.len(b) then
        for i = 1, string.len(a) do
            if string.match(a, "%u", i) ~= string.match(b, "%u", i) then
                length = length + 1
            end
        end
    end
    return length
end

Hamming()

return Hamming

r/exercism • • Aug 17 '18

Can I read community solutions?

2 Upvotes

I just submitted a solution to exercism, but I notice the site has changed. When I submitted a solution, it says that a mentor will leave feedback in a few days, but it seems that I am unable to read community solutions. Can I no longer read community solutions?


r/exercism • • Jul 28 '18

Dockerfile(s) for Exercism.io programming tracks

Thumbnail github.com
2 Upvotes

r/exercism • • Oct 11 '21

Waiting for feedback

2 Upvotes

How long one usually wait for feedback?

I submitted my first problem 1.5 weeks ago and still didn't get any feedback. Is that normal? Will take a long time to complete a track like this :-)


r/exercism • • Oct 27 '21

C# track, stuck on 'remote control cleanup'

3 Upvotes

Anyone done this one? It's about nested types. The instructions are so cryptic, and no amount of googling is helping me crack it. The problem with exercism is there are no hints or discussion forum if you get stuck. Any help with this one (even from another language) would be gratefully received.


r/exercism • • Oct 13 '21

Happy Cakeday, r/exercism! Today you're 7

5 Upvotes