Task
Everyone likes eating out with friends. The more friends, the better, but the bill time is always a bummer, to say the least. So, create a text-based Bill Splitter tool that lets a group of friends share a restaurant bill evenly - with an optional “Who Is Lucky?” feature to excuse one random friend from paying.
Instructions
- Prompt for the number of friends joining (including the user) and then based on that ask for the name of all friends.
- Prompt for the total bill amount.
- Ask whether to enable the “Who is lucky?” feature. If enabled, randomly pick one friend to pay nothing; if not, include everyone in the bill split.
- Calculate the split amount and display the result.
Expected Output
### Bill Splitter ###
Enter the number of friends joining (including you): 5
Enter friend #1 name: Rita
Enter friend #2 name: Sita
Enter friend #3 name: Gita
Enter friend #4 name: Nita
Enter friend #5 name: Mita
Enter the total bill value: 5040
Do you want to use the "Who is lucky?" feature? Write Yes/No: Yes
Nita is the lucky one!
Rita: 1260.0
Sita: 1260.0
Gita: 1260.0
Nita: 0.0
Mita: 1260.0Main Lessons
- Implementing conditional logic to toggle features
- Managing data in a structured and relational manner
Guidelines
Feel free to implement additional features to enhance the user experience.