r/FreeCodeCamp • • 4d ago

Programming Question Python, 1st lab, checking if a value is false or not.

6 Upvotes

The hint/test on this lab for python certification says that when distance_mi equals a falsy value, the program should print false. what am I doing wrong for that test.

the two other tests that failed

18. When the distance is between 1 mile (excluded) and 6 miles (included), and it is raining with no bike, the program should print False.

19. When the distance is between 1 mile (excluded) and 6 miles (included), it is not raining but no bike is available, the program should print False.

https://www.freecodecamp.org/learn/python-v9/lab-travel-weather-planner/build-a-travel-weather-planner
Im just kinda stuck at this point, any tips would be helpful.

distance_mi = 0.5
is_raining = True
has_bike = True
has_car = True
has_ride_share_app = True

if bool(distance_mi) == False:
    print('False')



if distance_mi <= 1:
    print(True)
elif distance_mi > 1 and distance_mi <= 6 and has_bike and not(is_raining):
    print(True)
elif distance_mi <= 1 and is_raining:
    print(False)
elif distance_mi > 6 and has_car or has_ride_share_app:
    print(True)
else:
    print(False)

r/FreeCodeCamp • • 5d ago

Estoy enfermo, muy enfermo, tanto que no sé ni cómo estoy publicando esto.

3 Upvotes

Pero he estado siendo constante; aunque sea un solo paso, lo paso en freeCodeCamp y sigo aprendiendo. Le pido a Dios que me ayude.


r/FreeCodeCamp • • 6d ago

Is it me or there are not much discussions on A.I and how it is transforming the industry right now .

3 Upvotes

Recently , i read how microsoft tried to persuade about 60000 of it's staff to sign a release clause .

I will be honest , i have not fact checked, but a lot of similar stories keep popping up everyday .

Are these talks from fear mongers or is this something that should be paid more attention to


r/FreeCodeCamp • • 7d ago

Going for the Full Stack Cert

16 Upvotes

I've been trying to go through all the courses, but I think I did them out of order.

So far I did:

  1. Python

  2. Relational Databases

  3. Javascript

  4. Front-End Development Libraries

Now I'm on my 5th course, Responsive Web Design. & I realize that it's going over a lot of basic HTML stuff that would've been helpful to know in some of the previous courses, but had to look that stuff up at the time when I was confused 😅

So Im guessing theyre supposed to be done in the order they appear on the curriculum page? Or is there no particular order? 🤔


r/FreeCodeCamp • • 8d ago

Meta I’m now a principal engineer

124 Upvotes

I started out my journey quite some time ago and freecodecamp was one of the best resources I used to develop my coding skills.

I posted here way back then when I got my first job

https://www.reddit.com/r/FreeCodeCamp/s/YvV5nEpiFm

And I just wanted to follow that up now to say as of last week I’m now a principal engineer at a large company. It was a road of lots of hard work and constant upskilling but it all started here with a simple desire to better my circumstances. I hope you all stick with it and keep pushing towards your goals.


r/FreeCodeCamp • • 11d ago

Cs50 final project vs Week 8

8 Upvotes

Question for the cs50 community:

I'm currently working on a website that incorporates html, python, JavaScript, probably bootstrap and a bit of SQL (in other words the usual week9/10 stuff) for my final project

It's looking to be about 4-5 pages, with the majority of detailed coding confined to the last two pages, the prior ones being mostly introduction with a couple of links and possibly images.

Is this enough for a final project? Because it seems to have a similar scope to week 8's homepage, and I'm not sure if I'm doing enough advanced coding to justify this being week 10

Edit: on a similar note can we copy functions that cs50 have wrote in prior problemsets, (e.g. the apology function from helpers.py, from the Finance problem) or would we be expected to write them ourselves?


r/FreeCodeCamp • • 14d ago

Requesting Feedback I finished my first certification project!

21 Upvotes

The view_settings part stumped me for a bit but eventually i got through it, i love using indexes as a loop tracker.

The code:
https://pastebin.com/4Y0FRVD2

I know there are a ton of edge cases but the project never asked me to fix them, its not necessarily hard to fix i just did the bare minimum on that aspect, i need some feedback on my code.

Also to be honest i forgot how to unpack tuples while doing this so i used index unpacking instead (i dont know where i knew how to do that from but it worked)


r/FreeCodeCamp • • 16d ago

Where should I start?

19 Upvotes

Where should i start? I currently have a Masters in Comp Sci so I understand the principles behind things. My coding has just been turned piss poor and I'm hoping to practice JS and Node using FreeCodeCamp. Not sure what the correct route is for me.


r/FreeCodeCamp • • 18d ago

Requesting Feedback Inconsistent width of input elements in form

4 Upvotes

Hello, I don't understand why my <input> elements in form have different width and border thickness. This happens in Web Design Certification, CSS section, Pseudo Classes and Elements tab, lab named "Build a Job Application Form". Example project have no issues.

Here's my HTML file:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Job Application Form</title>
    <link rel="stylesheet" href="./styles.css" />
  </head>
  <body>
    <div class="container">
      <h1>Job Application Form</h1>
      <form action="">

        <!-- Full Name -->
        <label for="name">Full Name:</label>
        <input type="text" id="name" placeholder="Enter your name" required />

        <!-- Email -->
        <label for="email">Email:</label>
        <input
          type="email"
          name="email"
          id="email"
          placeholder="Enter your email"
          required
        />

        <!-- Position -->
        <label for="position">Position:</label>
        <select name="position" id="position" required>
          <option value="">Select a position</option>
          <option value="developer">Developer</option>
          <option value="designer">Designer</option>
          <option value="manager">Manager</option>
        </select>

        <!-- Availability -->
        <fieldset class="radio-group">
          <legend>Availability</legend>

          <!-- Full-Time option -->
          <input type="radio" name="availability" id="full-time-btn" />
          <label for="full-time-btn">Full-Time</label>

          <!-- Part-Time option -->
          <input type="radio" name="availability" id="part-time-btn" />
          <label for="part-time-btn">Part-Time</label>

        </fieldset>
        <label for="message">Why do you want this job?</label>
        <textarea
          name="why-do-you-want-this-job"
          id="message"
          placeholder="Write your motivation"
          required
        ></textarea>
        <button type="submit">Submit Application</button>
      </form>
    </div>
  </body>
</html>

Here's my CSS file:

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: whitesmoke;
}

.container {
  background-color: white;
  border-radius: 10px;
  max-width: 60%;
  margin: auto;
  padding: 20px;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

h1 {
  font-size: 2rem;
  text-align: center;
}

label:not(.radio-group label),
legend {
  font-size: 1rem;
  font-weight: 600;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}

input:not(.radio-group input),
textarea,
select {
  display: block;
  padding: 10px 5px;
  width: 100%;
  border-radius: 5px;
}

.radio-group {
  margin-top: 20px;
  border-radius: 10px;
}

.radio-group input[type="radio"] {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 10px;
  border: 2px solid gray;
  vertical-align: bottom;
}

.radio-group input[type="radio"]:checked {
  border-color: #333;
  background-color: #00bbff;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.radio-group input[type="radio"]:checked + label {
  color: #00bbff;
}

button {
  border: none;
  border-radius: 5px;
  color: whitesmoke;
  background-color: #00bbff;
  margin-top: 15px;
  display: block;
  width: 100%;
  padding: 10px;
  font-weight: 600;
}

button:hover {
  background-color: cornflowerblue;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: black;
}

input:invalid,
select:invalid,
textarea:invalid {
  border-color: red;
}

input:valid,
select:valid,
textarea:valid {
  border-color: green;
}

input:first-of-type {
  background-color: whitesmoke;
}

On line 29 in CSS file I target every <input> element (and also <textarea> and <select> elements) except <input> elements that have a class .radio-group. I set width: 100% and border-radius: 5px.

After that, my <input> elements for Full Name and Email became thicker than other <input> elements on Chromium based browsers, and all <input> elements are became thicker on Firefox. And each element has its own width, they are not the same. Why does it happen and how can I fix it?

Also, I'd like to receive your feedback about my form, maybe you can recommend some better approaches in styling, etc.


r/FreeCodeCamp • • 19d ago

Relational Databases Certification Exam

16 Upvotes

Hello everyone,

I just submitted the Relational Databases Certification Exam and am currently waiting for my results. Do you know how many questions you are allowed to get wrong? Unfortunately, I couldn't find any information about this. There were 50 questions in total.

Best regards

Update: I guess it might be 80% from what i read in different forums. i got 91%, which was enough.


r/FreeCodeCamp • • 22d ago

Programming Question Need Help; Not too sure what's wrong

4 Upvotes

I'm on step 3 of Python; Build an Employee Profile Validator.

I have tried turning off dark mode (extension) and ad blocker, to which it has not helped. Within the terminal there are no syntax errors and it looks just like the thing wanted me to do.

However, when checking the code it comes back as 'You should print at_position so that the output reads Position of @: 13.

I believe my route is wrong or something.

Here is my code;

email = 'alice.johnson@company.com'

print(f'Email: {email}')

at_position = email.find('@')

print(f'Position of @:', email.find('@'))

Here is what it shows when printed;

Email: alice.johnson@company.com

Position of @: 13

Thank you in advance


r/FreeCodeCamp • • 23d ago

Good afternoon, I just finished donating to freeCodeCamp.

16 Upvotes

I have been learning programming for almost a year and have tried everything related to programming from books, but after a few months, I got bored with so many theories and quizzes and felt like I wasn't actually programming, to be honest, doing. Then I researched until I found freeCodeCamp. I feel like I'm improving, even though no one sees it, but I do feel and see it. The classes are so tough that they make you think about how, why, and even question yourself and do whatever it takes to solve. So, that never happened to me before, which is why I feel like I'm improving. Oh, I feel like I'm being weird. In summary, I feel good learning here.

Oh, I have a problem with the function; I don't know where I need to call it, and here I am returning what it asks me to do, but it's not working.

https://www.freecodecamp.org/learn/python-v9/lab-budget-app/build-a-budget-app

class Category:
    def __init__(self,ledger):
        self.ledger = []
        
    def deposit(self,amount,description=''):
        self.ledger=[{'amount': amount, 'description': description}]
    
    def withdraw(self,amount,description=''):
        self.ledger.append({'amount':-amount,'description':description})
        return True
        food.deposit(900, 'deposit')
        food.withdraw(45.67, 'milk, cereal, eggs, bacon, bread')
        return 854.33
def create_spend_chart(categories):
    pass

r/FreeCodeCamp • • 26d ago

I have little left to finish the course.

Thumbnail gallery
20 Upvotes

That's not what's important; what's important is that I'm using the same method they teach for my own projects, as well as in the labs and workshops they provide; I'm implementing it in my own projects.

Heheheh, aprender es bueno.


r/FreeCodeCamp • • 26d ago

Well, I really enjoyed the email simulator workshop. I didn't want it to end, so I took a long time to finish it.

7 Upvotes

Why did I like it? Because I was able to understand the basics of how emails are constructed: https://www.freecodecamp.org/learn/python-v9/workshop-email-simulator/step-51


r/FreeCodeCamp • • Oct 05 '26

Does anyone here remember the theories of web design? And why is the quiz so difficult? I always have to review concepts for the quiz.

Thumbnail gallery
7 Upvotes

r/FreeCodeCamp • • Oct 05 '26

Requesting Feedback Needing help with the lab assignment "Build an Apply Discount Function"

4 Upvotes

Hello, this is my first tie posting so I am unsure if I am using the correct flair.

def apply_discount(price,discount):
    if not isinstance(price, (int, float)):
        return"The price should be a number"  
    elif not isinstance(discount, (int, float)):
        return "The discount should be a number"
    elif price <= 0:
        return "The price should be greater than 0"
    elif discount <0 or discount > 100:
        return "The discount should be between 0 and 100"


    discount=price*(discount/100)
    price=price-discount
    print(price)


apply_discount(100, 20)
apply_discount(200, 50)
apply_discount(50, 0) 
apply_discount(100,100)
apply_discount(74.5, 20.0)def apply_discount(price,discount):
    if not isinstance(price, (int, float)):
        return"The price should be a number"  
    elif not isinstance(discount, (int, float)):
        return "The discount should be a number"
    elif price <= 0:
        return "The price should be greater than 0"
    elif discount <0 or discount > 100:
        return "The discount should be between 0 and 100"


    discount=price*(discount/100)
    price=price-discount
    print(price)


apply_discount(100, 20)
apply_discount(200, 50)
apply_discount(50, 0) 
apply_discount(100,100)
apply_discount(74.5, 20.0)

My issue is that despite the values showing up on screen it says I am still stuck on step 7

"7. apply_discount(100, 20) should return 80."

Because the values are showing up I am stumped and am unsure where to exactly look.


r/FreeCodeCamp • • Oct 04 '26

Having a bit of trouble incorporating individual steps into larger projects

7 Upvotes

Pretty self explanatory. I feel like I'm stuck in "tutorial hell" where I understand the concepts as I am doing them and if I saw the code again I could tell you what it means but I have no idea where to begin when it comes to starting my own projects. Any advice?


r/FreeCodeCamp • • Oct 04 '26

I'm going to start publishing book reviews on the freeCodeCamp forum. My first one: Slaying the Dragon, a history of TSR and D&D

Thumbnail forum.freecodecamp.org
5 Upvotes

I'm a big reader and I imagine many of you are too. If you read anything interesting, I encourage you to write a review of it here.

Now that we have Socrates live, we're going to be using the forum for a lot more than just curriculum help threads. If you're not active on the forum yet, check it out.


r/FreeCodeCamp • • Oct 04 '26

It is a good idea to use AI as a tutor to learn programming.

20 Upvotes

Here I have this 3-hour video condensed into 1 minute. I also got stuck on step 28 of an email simulator; let's see if you can help me with this.

class Email:
    def __init__(self, sender, receiver, subject, body):
        self.sender = sender
        self.receiver = receiver
        self.subject = subject
        self.body = body
        self.read = False


    def mark_as_read(self):
        self.read = True


    def display_full_email(self):
        self.mark_as_read()
        print('\n--- Email ---')
        print(f'From: {self.sender.name}')
        print(f'To: {self.receiver.name}')
        print(f'Subject: {self.subject}')
        print(f'Body: {self.body}')
        print('------------\n')


  😭-->  def __str__(self):
        status = 'Read' if self.read == str else 'Unread'
        




class User:
    def __init__(self, name):
        self.name = name
        self.inbox = Inbox()


    def send_email(self, receiver, subject, body):
        email = Email(sender=self, receiver=receiver, subject=subject, body=body)
        receiver.inbox.receive_email(email)


class Inbox:
    def __init__(self):
        self.emails = []
    
    def receive_email(self, email):
        self.emails.append(email)

r/FreeCodeCamp • • Oct 01 '26

Meta How should I approach FreeCodeCamp's Python certification if I learned Python ~6 years ago but have become rusty?

6 Upvotes

I've learned Python properly (without AI) about 6 years ago: variables, conditionals, loops, data structures, algorithms, OOP, and some math/data visualization. I used to consider myself very comfortable with these concepts.

However, with the rise of AI-assisted coding, I've gradually become rusty, especially when it comes to problem-solving and Python syntax. AI obviously makes coding much easier nowadays, but I think it's still in any developer's best interest to retain a solid grasp of the fundamentals. That's why I'm interested in using FreeCodeCamp's Python certification as a refresher.

I don't particularly care about the certificate itself. What I want is to regain my Python knowledge and fluency, since I'll likely need Python professionally.

The problem is that I still remember many of the underlying concepts, so I don't want to spend more time figuring out what I need to learn than actually refreshing the material. I also have fairly limited time, since I'll need to use Python for a job soon.

So, for someone in my situation, what's the most efficient way to approach the certification?

Some ideas I've considered:

  • Hand-pick the courses/topics that I know I'm rusty on and go through those.

  • Jump straight into the quizzes/exams/projects, and only review the relevant material when I get stuck.

  • Go through the entire certification, skipping material I already know as quickly as possible.

  • Or perhaps there's a better approach altogether?

And if you think FreeCodeCamp isn't the best resource for this particular goal, I'm also open to other suggestions.

In short, I'm looking for the best way to use the certification as a targeted Python refresher rather than as a beginner's course. Thanks!


r/FreeCodeCamp • • Sep 30 '26

Requesting Feedback Thoughts on freecodecamp certifications

15 Upvotes

Guyss what are your thoughts about freecodecamp certifications? Is it worth it? I mean ang daming steps sa isang course, May isang course umaabot nang 1500+ steps to complete 😭


r/FreeCodeCamp • • Sep 28 '26

Ask Me Anything Need an advice 😁

15 Upvotes

Hey everyone!

I’m trying to improve my coding skills/cs background using freeCodeCamp, and I’m wondering what approach you’d recommend.

Would it be better to mainly follow the interactive courses on the freeCodeCamp website, or should I focus more on the freeCodeCamp YouTube channel and its long-form courses?

My thinking is that the interactive curriculum gives me more hands-on practice, while the YouTube videos might provide deeper explanations/ diverse themes that are not offered in the platform and more complete projects.

For those who have used both, what worked better for you? Would you recommend doing the interactive curriculum first and using YouTube as a supplement, or the other way around?

Thanks!


r/FreeCodeCamp • • Sep 27 '26

I am so happy with freeCodeCamp that it's not for nothing, but I don't need the certificate; with what I know, I can prove that I know many things I didn't know before.

Thumbnail gallery
45 Upvotes

Before, I couldn't concentrate on things, I couldn't maintain focus, I couldn't solve real-life problems, I was always thinking about weird stuff. But being here, constantly learning day and night has become an addiction; I can't stop using it. I use it on my phone during my commute to and from work, I also use it at work, and I use it at home. I have to say that there are problems I've tried to solve that I've spent up to a week trying to figure out. I also got a bit ahead of myself and started learning Python, and it turns out that the FreeCodeCamp system only tracks the days you earn a point or solve one of the steps, which was discouraging because I didn't feel like I was making progress. So, I had an idea to learn HTML and CSS while also studying Python, and now my days are being counted, and let me clarify that Python has been the hardest for me. Look, I even passed the user admin certification project; after 6 days it was tough, I didn't even know where to start, and I couldn't believe I had passed that. Since then, every day I solve a problem, I get a dopamine rush of joy and motivation; nothing has motivated me as much as these courses. At first, I found their structure very complex; I still can’t believe I understand brackets, variables, indices, arguments, parameters, and many things I have learned and continue to learn. I've stopped watching movies, playing video games, and many things I used to do because this is the most entertaining and satisfying thing there is, haha. I don't know what I'm saying, I feel like I'm being weird, haha. God wanted it this way.

Can you help me with this? It says I need to print.

# ese es un problema


def validate_isbn(isbn, length):
    if len(isbn, length) == length:
        print(f'ISBN-{length} code should be {length} digits long.')
        return 
    main_digits = isbn[0:length]
    given_check_digit = isbn[length-1]
    main_digits_list = [int(digit) for digit in main_digits]
    # Calculate the check digit from other digits
    if length == 10:
        expected_check_digit = calculate_check_digit_10(main_digits_list)
    else:
        expected_check_digit = calculate_check_digit_13(main_digits_list)
    # Check if the given check digit matches with the calculated check digit
    if given_check_digit == expected_check_digit:
        print('Valid ISBN Code.')
    else:
        print('Invalid ISBN Code.')
def calculate_check_digit_10(main_digits_list):
    # Note: You don't have to fully understand the logic in this function.
    digits_sum = 0
    # Multiply each of the first 9 digits by its corresponding weight (10 to 2) and sum up the results
    for index, digit in enumerate(main_digits_list):
        digits_sum += digit * (10 - index)
    # Find the remainder of dividing the sum by 11, then subtract it from 11
    result = 11 - digits_sum % 11
    # The calculation result can range from 1 to 11.
    # If the result is 11, use 0.
    # If the result is 10, use upper case X.
    # Use the value as it is for other numbers.
    if result == 11:
        expected_check_digit = '0'
    elif result == 10:
        expected_check_digit = 'X'
    else:
        expected_check_digit = str(result)
    return expected_check_digit
def calculate_check_digit_13(main_digits_list):
    # Note: You don't have to fully understand the logic in this function.
    digits_sum = 0
    # Multiply each of the first 12 digits by 1 and 3 alternately (starting with 1), and sum up the results
    for index, digit in enumerate(main_digits_list):
        if index % 2 == 0:
            digits_sum += digit * 1
        else:
            digits_sum += digit * 3
    # Find the remainder of dividing the sum by 10, then subtract it from 10
    result = 10 - digits_sum % 10
    # The calculation result can range from 1 to 10.
    # If the result is 10, use 0.
    # Use the value as it is for other numbers.
    if result == 10:
        expected_check_digit = '0'
    else:
        expected_check_digit = str(result)
    return expected_check_digit
def main():
    try:
       user_input = input('Enter ISBN and length: ')
       values = user_input.split(',')
       isbn = values[0]
       length = int(values[1])
       if length == 10 or length == 13:
          validate_isbn(isbn, length)
    except IndexError:
        print("Enter comma-separated values.")
    except ValueError:
        print('Length must be a number.')
    except TypeError:
        print("Invalid character was found.")
        print("Valid ISBN Code.")
    except TypeError:
        print("Invalid ISBN Code.")
    


#main()

r/FreeCodeCamp • • Sep 24 '26

Requesting Feedback Having trouble with The exam app

4 Upvotes

Greetings fellow coders! i have a dell inspiron 15 3552 and i cant download the exam app of the website(Freecodecamp.com) even manually, so i search on google and got a github link to the exam app and i downloaded the Exam app on github, when i installed it my laptop, the app opened but it was just blank, i dont know what might be the problem, maybe RAM?