Choosing the right programming language can feel overwhelming, especially for beginners. Should you learn Python, JavaScript, Swift, or something else? The answer depends on what you want to build! That’s why we are launching a fun and practical Python challenge: Build a Programming Language Recommender.
In this challenge, you’ll create a Python program that guides users to the best programming language for their project. Whether they want to build a website, a mobile app, a video game, or even create a computer program to control an embedded device, your program will ask the right questions and provide tailored recommendations.
How It Works
Your task is to write a Python program that interacts with the user through a series of questions. Based on their answers, your program will suggest one or more programming languages that fit their goals.
Your algorithm will be based on the following classification (Click on the picture to open in a new window).
The first question your program will need to ask is:
The user will have to pick an option: Website, Mobile App, Video Game, Desktop Software or Embedded System
Based on the user choice, the program will then ask follow-up questions. For instance, if the user selects “Mobile App” the program will then ask:
Based on the answers provided by the end-user, the program will suggest the most relevant programming languages the end-user should consider for their project.
Decision Tree Logic
To complete this challenge you will need to use decision tree logic to implement the given classification (see picture above). To to do so you will have to use several nested IF, ELIF and ELSE statements within your code.
Here is an example of what your code may look like:
print("Welcome to the Programming Language Recommender!") project = input("What would you like to create? (Website/Mobile App/Video Game/Desktop Software/Embedded System): ").lower() if project == "mobile app": platform = input("Is this app for iPhone or an Android phone? ").lower() if platform == "iphone": print("We recommend learning Swift or Dart!") elif platform == "android": print("We recommend learning Kotlin or JavaScript, Python or Dart!") else: print("Invalid Option!") # Add more conditions for other types of projects!
When using nested if statements within an algorithm, make sure to indent your code properly:
Python Code
Use our online Python IDE to complete this challenge:

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area