Why members discontinue and thereby reduce attrition

Assignment Help Python Programming
Reference no: EM132357215

Question

Task

A video games club, AB Games, has many members who can connect to the AB Games servers and play many Play Station games (such as Assassin's Creed, Call of Duty, Minecraft, Nino Kuni and Naruto) online even without needing to have a Play Station. Each time they play a game they pay $2 on top of their monthly membership fees.

Many members discontinue with AB Games after some time. AB Games is very keen to identify reasons why members discontinue and thereby reduce attrition.

AB Games have a rich database on their members having information of each member on Age, Win-Loss Ratio, Number of Log-ins, Income and Status (i.e. whether continued or discontinued). They then run a data mining algorithm called SysFor, which automatically discovers logic rules on why some members discontinue while others continue. AB Games runs SysFor and fortunately you DO NOT have to code SysFor.

Assume that SysFor produces logic rules from a dataset and the logic rules are stored by SysFor in a text file called Rules.txt as follows.

GE stands for Greater than or Equal to, LT stands for Less Than, and the "-" sign indicates has no impact.

Other than the two header lines the Rules.txt file has five lines meaning that there are five logic rules. Each rule tells us the properties of the members who continue/discontinue.

The first rule states that if the Age of a member is greater than or equal to 25 and his/her Win-Loss ratio is greater than or equal to 8, then the member continues with the club. For ease of understanding, it can also be represented as: If Age >= 25 & Win-Loss >= 8 --> Continue. Similarly, the 2nd rule states that If Age >= 25 & Win-Loss < 8 --> Discontinue.

AB Games also has a dataset on their current members for whom AB Games does not know whether they will continue or discontinue. The dataset is stored in a file called Members.txt as follows.

In the Members.txt file there are two current members. The first member is 35 years old, has a Win-Loss ratio of 5, has logged in 512 times, and earns $20,000 per annum. The file also has similar information on the second member. However, the "?" mark for the variable Status indicates that AB Games at this stage does not know whether or not the members will continue with them.

Write a Python code that will match the members in the Members.txt file with the logic rules in the Rules.txt file to identify the Status of each member. Your Python code will then write a file calledMemberReport.txt as follows.

Since the first member in the Members.txt file has age greater than 25 and win loss ratio less than 8 he/she matches the 2nd rule in the Rules.txt file which suggests that he/she will discontinue. Similarly, the 2nd member matches the 3rd rule which suggests that he/she will continue.

Note that although the structure and schema of the Rules.txt file and Members.txt file will remain unchanged AB Games can change the values in the files. Additionally, the Rules.txt file can have any number of rules. Similarly, Members.txt file can also have any number of members. Your Python code should still produce correct MemberReport.txt file.

Rules.txt, Members.txt and MemberReport.txt files should be in the same folder as the Python code.

Use appropriate data structure in writing your code.

All exceptions need to be handled. Invalid inputs need to be handled and asked for a valid input again.

Use functions to make your program well designed, instead of just using a single main function. We expect you to use at least four (4) functions other than the main function.

Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified.

Implement your algorithm in Python.

Avoid duplicate code.

Comment your code as necessary to explain it clearly.

Select 3 sets of test data that will demonstrate the correct "normal" operation of your program.

Run your program using the test data you have selected and save the output it produces in a text file.

Reference no: EM132357215

Questions Cloud

Relational set operators in database : Suppose you are tasked with finding common data elements amongst various data sets. Specify how an INTERSECT operator may assist you in accomplishing this task.
Define possible tort claim that patty make against cash mart : What are the possible tort claims that Patty can make against Cash Mart? Discuss the elements of the claim and how those elements relate to the facts in the.
Pre-written exception classes : Write the code to throw the Exception you created above using the message, "age must be between 0 and 120"
Checked exception and unchecked exception : If an Exception is not a checked exception it must extend what class? What is the difference between a checked Exception and an unchecked Exception?
Why members discontinue and thereby reduce attrition : Write an algorithm in structured English pseudocode that describes the steps required to perform the task specified. Run your program using the test data.
Identify the specific manufacture and model : Recommend the device that would be the best suited for a home environment and the device that would be best suited for a business environment.
Do you believe the consequences lead to long-term problems : America's prison system is considerably different than prison systems across the world. While some people believe our system does exactly what it is designed.
Versatile in sql programming styles : A good IT professional is able to be versatile in SQL programming styles.
How is the risk-needs-responsivity model applied : According to the Lizman, Matthews, and Reyes (2014) in What Works? Short-Term, In-Custody Treatment Programs, there are a number of risk-needs-responsivity.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd