Choosing a sport can be tricky! Some people enjoy team sports, others prefer individual sports. Some love being outdoors, while others prefer indoor activities.
In this Python challenge, you will create a simple sports adviser program that asks the user a series of questions and then recommends a sport based on their answers.
This challenge is perfect for practising:
- input() statements
- if / elif / else conditions
- Boolean logic
- Simple decision trees
Challenge Objective
Write a Python program that asks the user a few questions about their preferences and then suggests a sport they might enjoy.
Your program should ask questions such as:
- Do you like team sports?
- Do you prefer indoor or outdoor sports?
- Do you enjoy water activities?
- Do you like fast-paced sports?
- Do you enjoy contact sports?
Based on the answers, your program will recommend either one or a selection of relevant sports.
Here is a selection of indoor and outdoor sports for you to consider:
| Sport | Team / Individual | Indoor / Outdoor | Contact / Non-Contact | Fast Paced? | Water Based? |
|---|---|---|---|---|---|
| Football | Team | Outdoor | Contact | Yes | No |
| Basketball | Team | Indoor | Contact | Yes | No |
| Rugby | Team | Outdoor | Contact | Yes | No |
| Cricket | Team | Outdoor | Non-Contact | No | No |
| Swimming | Individual | Indoor / Outdoor | Non-Contact | Yes | Yes |
| Surfing | Individual | Outdoor | Non-Contact | Yes | Yes |
| Running | Individual | Outdoor | Non-Contact | Yes | No |
| Tennis | Individual | Indoor / Outdoor | Non-Contact | Yes | No |
| Badminton | Individual | Indoor | Non-Contact | Yes | No |
| Golf | Individual | Outdoor | Non-Contact | No | No |
| Cycling | Individual | Outdoor | Non-Contact | Yes | No |
| Kayaking | Individual | Outdoor | Non-Contact | Yes | Yes |
| Volleyball | Team | Indoor / Outdoor | Non-Contact | Yes | No |
| Squash | Individual | Indoor | Non-Contact | Yes | No |
| Gymnastics | Individual | Indoor | Non-Contact | No | No |
| Boxing | Individual | Indoor | Contact | Yes | No |
| Karate | Individual | Indoor | Contact | Yes | No |
| Rowing | Team / Individual | Outdoor | Non-Contact | Yes | Yes |
| Table Tennis | Individual | Indoor | Non-Contact | Yes | No |
| Field Hockey | Team | Outdoor | Contact | Yes | No |
Python Code
We have started the code for you, though you will need to complete this code to asks more questions about the user preferences and make more suggestions based on their preferences and on the above list of sports.






