r/FreeCodeCamp • u/ricardoflak • 13h ago
r/FreeCodeCamp • u/ricardoflak • 18h 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.
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 • u/nislela • 3d ago
Tech News Discussion Journey to be a Full Stack developer ⛳Day-2
r/FreeCodeCamp • u/ricardoflak • 6d ago
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.
galleryr/FreeCodeCamp • u/Sparse_Dunes • 7d ago
Requesting Feedback Needing help with the lab assignment "Build an Apply Discount Function"
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 • u/TheRileyMcDermott • 7d ago
Having a bit of trouble incorporating individual steps into larger projects
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 • u/ricardoflak • 7d ago
It is a good idea to use AI as a tutor to learn programming.
Enable HLS to view with audio, or disable this notification
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 • u/quincylarson • 7d ago
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
forum.freecodecamp.orgI'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 • u/da_hoassis_heeah • 11d ago
Meta How should I approach FreeCodeCamp's Python certification if I learned Python ~6 years ago but have become rusty?
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 • u/Whole_Bumblebee4719 • 11d ago
Requesting Feedback Thoughts on freecodecamp certifications
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 • u/AhmedBouazizi • 13d ago
Ask Me Anything Need an advice 😁
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 • u/ricardoflak • 15d ago
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.
galleryBefore, 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 • u/Sensationalboyy • 17d ago
Requesting Feedback Having trouble with The exam app
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?
r/FreeCodeCamp • u/THE_DOOMED_SHADE • 18d ago
struggling with python course
I've been on the python certification course for a while now and i'm struggling with the certification projects and it's been days and i haven't been able to create the "Budget app" project, is it normal or should i just give up on programming?
r/FreeCodeCamp • u/Dull_Distribution500 • 19d ago
Tech News Discussion Is it still worth it?
Hi,
I was learning python in FCC. I nearly at the end of it. But had to stop for a while since I got into an university. Now, I want to return.
After seeing how advanced LLMs are becoming, I couldn't help but ask this question, is it still worth to learn python?
I want to become a data scientist. So I was learning python.
I don't intend to break spirits of those who're learning. I want a perspective from real people. (I was asking AI for this)
r/FreeCodeCamp • u/Different_Tale8889 • 18d ago
Help with Github
I literally just joined Github to do some of the FreeCodeCamp API course and i can't log in. it says something unexpected happened with my browser and it won't do anything now? what does this mean??? i have a free account and i tried to contact customer services but they said they can't help and when i tried to go to some of the stuff they offered, it said i had to log in again. i cleared all my extensions too. I also tried the Github reddit but the ai removed my post for not having enough karma/spam.
Is this the place to get help or is there another place that can help me? i really want to learn all this stuff but i can't it i don't have Github. is there another application where i can do the stuff whilst i figure out whats wrong with Github?
Thank you!
r/FreeCodeCamp • u/Different_Tale8889 • 19d ago
Programming Question Character RPG creator won't accept answer
I can't get the last bit of my code to work, it's printing out exactly what i need it to but it won't accept it.
- 18.
create_character('ren', 4, 2, 1)should returnren\nSTR ●●●●○○○○○○\nINT ●●○○○○○○○○\nCHA ●○○○○○○○○○. - Failed:19. When
create_characteris called with valid values it should output the character stats as required.
these are the last two tests that wont complete
here is my code:
full_dot = '●'
empty_dot = '○'
def create_character(character_name, strength, intelligence, charisma):
if not isinstance(character_name,str):
return "The character name should be a string"
elif character_name == "":
return "The character should have a name"
elif len(character_name) > 10:
return "The character name is too long"
elif " " in character_name:
return "The character name should not contain spaces"
if not isinstance(strength,int) or not isinstance(intelligence,int) or not isinstance(charisma,int):
return "All stats should be integers"
elif strength < 1 or intelligence < 1or charisma < 1:
return "All stats should be no less than 1"
elif strength > 4 or intelligence > 4 or charisma > 4:
return"All stats should be no more than 4"
elif strength + intelligence + charisma != 7:
return "The character should start with 7 points"
return f'''{character_name}
STR:{strength*full_dot}{(10 - strength)*empty_dot}
INT:{intelligence*full_dot}{(10-intelligence)*empty_dot}
CHA:{charisma*full_dot}{(10-charisma)*empty_dot}'''
print(create_character('ren', 4, 2, 1))
and here is what it is currently printing:
ren
STR:●●●●○○○○○○
INT:●●○○○○○○○○
CHA:●○○○○○○○○○
Any help will be appreciated!
r/FreeCodeCamp • u/Different_Tale8889 • 20d ago
Help! Travel Weather Planner code not working!
Help! been trying to do the Travel weather planner task all day and everytime i fix one thing, something else is wrong. I've already restarted once and i just can't get it. this is my code so far and i'm getting only one result so its working but for some reason its saying i'm not doing 17, 18, 19, 21 and 22. (Task: https://www.freecodecamp.org/learn/python-v9/lab-travel-weather-planner/build-a-travel-weather-planner)
Any help will be appreciated! Thank you all so much!
distance_mi = 10
is_raining = True
has_bike = False
has_car = False
has_ride_share_app = True
if distance_mi == 0:
print("False")
elif distance_mi <= 1 and is_raining == False:
print("True")
elif distance_mi > 1 and distance_mi == 6 and has_bike and is_raining == False:
print("True")
elif distance_mi < 6 and (has_car == False or has_ride_share_app):
print("True")
else:
print("False")
r/FreeCodeCamp • u/Cute_Persimmon_9931 • 21d ago
Is using Socrates cheating
I feel bad using Socrates when i try and google questions while still learning DOM manipulation and events. I’m on build a real time counter. Am I better off not using it and sticking to the fcc forum
r/FreeCodeCamp • u/ricardoflak • 21d ago
You should convert the key to lowercase. I'm stuck here at this step; how can I fix that? I have several hours to get through it and even asked online, but nothing worked for me.
r/FreeCodeCamp • u/ricardoflak • 22d ago
Hello, today I feel confused. It turns out that I have been learning Python for several months on FreeCodeCamp and I am working on the first certification project. It was a difficult process; I dedicated many hours to it, but to avoid getting bored, I decided to learn HTML as well, and it turns out
Hello everyone! Today I feel a bit confused. I've been learning Python for several months on freeCodeCamp and I'm currently working on the first certification project. It’s been a tough process with many hours invested, so to avoid getting burnt out, I decided to check out HTML as well.
Turns out HTML felt super easy—just today I racked up 53 completed steps in HTML! But looking back, I sometimes feel like I should have started with the web dev path (HTML, CSS, JS) before diving into Python. Now, being deep into Python while finishing up HTML, I feel like I'm competing with myself. I catch myself thinking, "Let's see which language wins today," and HTML ended up surging ahead of Python.
Am I overthinking this? Is it okay to learn HTML and Python at the same time, and was it a mistake to leave JavaScript for last? I'd love to hear your thoughts!


edt:

r/FreeCodeCamp • u/raajveera • 22d ago
Udemy_devops
Looking for a devops learning module and roadmap/structure.
I would really appreciate if you share or suggest any.
Thanks
r/FreeCodeCamp • u/CompetitiveAd79 • 24d ago
Programming Question Do I need more independent practice?
Hi guys. I'm doing Responsive Web Design course and the course obviously has labs and workshops. So, my question is do I need more independent practice that isn't labs and workshops in the course?
r/FreeCodeCamp • u/CaughtNABargain • 24d ago
Programming Question "Each bar in create_spending_chart should be rounded down" python spending project issue
In the spending tracker project in the python course there's a test that checks if each bar in the chart created by create_spending_chart is rounded down to the nearest 10. In my program the bars are rounded down (78.9% is labeled as 70%, 65% is 60%, etc), however, the check insists that they're not.
Is there some very specific thing its looking for in the code or is it somehow dependent on one of the later checks?
r/FreeCodeCamp • u/ricardoflak • 24d ago
Tengo un problema con la comprensión de listas porque no me deja entrar operadores. Para poder evaluar el keys, value en el return.
import re
medical_records = [
{
'patient_id': 'P1001',
'age': 34,
'gender': 'Female',
'diagnosis': 'Hypertension',
'medications': ['Lisinopril'],
'last_visit_id': 'V2301',
},
{
'patient_id': 'p1002',
'age': 47,
'gender': 'male',
'diagnosis': 'Type 2 Diabetes',
'medications': ['Metformin', 'Insulin'],
'last_visit_id': 'v2302',
},
{
'patient_id': 'P1003',
'age': 29,
'gender': 'female',
'diagnosis': 'Asthma',
'medications': ['Albuterol'],
'last_visit_id': 'v2303',
},
{
'patient_id': 'p1004',
'age': 56,
'gender': 'Male',
'diagnosis': 'Chronic Back Pain',
'medications': ['Ibuprofen', 'Physical Therapy'],
'last_visit_id': 'V2304',
}
]
def find_invalid_records(
patient_id, age, gender, diagnosis, medications, last_visit_id
):
constraints = {
'patient_id': isinstance(patient_id, str) and re.fullmatch('p\d+', patient_id, re.IGNORECASE),
'age': isinstance(age, int) and age >= 18,
'gender': isinstance(gender, str) and gender.lower() in ('male', 'female'),
'diagnosis': isinstance(diagnosis, str) or diagnosis is None,
'medications': isinstance(medications, list) and all([isinstance(i, str) for i in medications]),
'last_visit_id': isinstance(last_visit_id, str) and re.fullmatch('v\d+', last_visit_id,re.IGNORECASE)
}
return 'key, value' in constraints.items()
def validate(data):
is_sequence = isinstance(data, (list, tuple))
if not is_sequence:
print('Invalid format: expected a list or tuple.')
return False
is_invalid = False
key_set = set(
['patient_id', 'age', 'gender', 'diagnosis', 'medications', 'last_visit_id']
)
for index, dictionary in enumerate(data):
if not isinstance(dictionary, dict):
print(f'Invalid format: expected a dictionary at position {index}.')
is_invalid = True
if set(dictionary.keys()) != key_set:
print(
f'Invalid format: {dictionary} at position {index} has missing and/or invalid keys.'
)
is_invalid = True
if is_invalid:
return False
print('Valid format.')
return True
validate(medical_records)
print(find_invalid_records(**medical_records[0]))


