Finishing code challenges (easy issues that may be solved with code) is an effective way to hone particular coding abilities and ideas. To not point out, code challenges are enjoyable! In honor of Delight Month in June, here’s a checklist of code challenges associated to inspiring the LGBTQ+ group and allies.
These coding challenges mean you can apply totally different Python ideas, corresponding to lists, strings, conditionals, constructions, and many others. Relying in your expertise stage, a few of these challenges will be accomplished in minutes, whereas tougher challenges could take days. We advocate retaking the Python course for a refresher (and making an attempt associated Python programs alongside the way in which).
As you’ll be able to see, these are open-ended challenges and we aren’t offering options. It’s because we need to give you a chance to apply core coding abilities and apply your coding information to real-world situations. We hope you get impressed by the alternative ways you should utilize code to contribute to communities and causes that curiosity you. Take pleasure and have enjoyable coding!
1. Affirmation Engine
Write a Python program that takes the person’s pronouns as enter and returns a message with an announcement that respects their pronouns and gender identification. An instance message would possibly appear to be this:Thanks for sharing that your pronouns are {pronouns}. We wholeheartedly respect and affirm your gender identification, and thanks for serving to us create an inclusive setting the place everybody feels valued and accepted.“
2. STEM Icon Sorter
Write a Python program that takes a listing of LGBTQ+ historic figures as enter and returns a brand new checklist of phrases alphabetized. Want a refresher on queer historical past? Find out about pioneering LGBTQ+ figures with our free course, LGBTQ+ STEM Icons.
3. ASCII Artist
Within the newbie course “Study Python 3”, ASCII Artis a type of text-based visible artwork by which particular person letters are used to create footage or diagrams. Write a Python program to print the phrase “PRIDE” in ASCII block letters. See the whole ASCII alphabet. Using this chart.
4. Delight March Countdown
Write a Python program to calculate the variety of days, hours, and minutes remaining till an finish. The annual New York Pride Marchwill start at 12:00 PM EDT on June twenty fifth. This system shows the countdown in a user-friendly format. Learn this text for a refresher on how one can work with date-time information in Python.
5. Acronym Rationalization
create change A loop that prints the time period represented by Acronym LGBTQ+These are lesbian, homosexual, bisexual, transgender, queer and non-straight/non-cisgender identities.
6. Rainbow Message Generator
You’re given the message “Code with pleasure!” and it’s important to rework it right into a rainbow-themed string. Every character is totally different LGBTQ+ Pride Flag ColorsYour job is to jot down a Python operate that takes a message as enter and returns a rainbow model of that message. Hints: ANSI escape codes Apply shade to textual content in Python.
7. Pronoun apply chatbot
Construct a easy chatbot that can assist you Practice using someone’s pronouns Code chatbots in several contexts. This code problem is probably the most superior problem, however do not be scared. Within the Construct a Chatbot with Python talent path, you may discover ways to code rule-based, search-based, and generative chatbots. One of the best half is that you do not want any coding expertise to get began. We’ll educate you how one can code in Python from scratch.
8. Discover LGBTQ+ illustration
Construct a program to learn the dataset ( Use this pre-built dataset) to investigate the illustration of LGBTQ+ characters in comics. This system calculates and shows statistics corresponding to tendencies and modifications in illustration through the years. If you happen to’re new to information science, try the “Getting Began with Python for Knowledge Science” course, the place you may get hands-on with actual datasets and discover ways to use Jupyter Notebooks, an industry-standard platform for information evaluation.
9. Pronoun Reminder
Write a easy Python program that takes a person’s identify and pronouns as enter and prompts the person to make use of these pronouns in a sentence. For instance, if the person varieties “Alex” and “they/them”, this system prints a message like “Alex makes use of the pronouns them/them!” You may discover ways to assign variables with person enter in Study Python 3.
Ten. Inclusive Language Checker
Develop a Python program to verify whether or not inclusive language is utilized in a given textual content. This system ought to determine phrases and phrases which may be thought of exclusionary or insensitive and recommend extra inclusive options. For instance, it may recommend changing “guys” with “of us” or “y’all”. This train helps you apply string manipulation and dictionary information constructions. To be taught extra about how computer systems course of human language, see Making use of Pure Language Processing with Python.
Want extra Python concepts? Attempt our Python code challenges for rookies or our coding challenges for superior customers. You too can try these code challenges based mostly on actual technical interviews. As soon as you are feeling you will have a deal with on the code challenges, be sure you try our library of Python initiatives you can full for apply or on your skilled portfolio.
This weblog was initially revealed in June 2023 and has been up to date to incorporate further Python challenges.

