pull/59/head
Asabeneh 5 years ago
parent d3b2c892ce
commit 2f06722dfb

@ -679,18 +679,18 @@ Now, the getPersonInfo method has been overridden and it identifies if the perso
```JS ```JS
ages = [31, 26, 34, 37, 27, 26, 32, 32, 26, 27, 27, 24, 32, 33, 27, 25, 26, 38, 37, 31, 34, 24, 33, 29, 26] ages = [31, 26, 34, 37, 27, 26, 32, 32, 26, 27, 27, 24, 32, 33, 27, 25, 26, 38, 37, 31, 34, 24, 33, 29, 26]
console.log('Count:', statistics.count()) # 25 console.log('Count:', statistics.count()) // 25
console.log('Sum: ', statistics.sum()) # 744 console.log('Sum: ', statistics.sum()) // 744
console.log('Min: ', statistics.min()) # 24 console.log('Min: ', statistics.min()) // 24
console.log('Max: ', statistics.max()) # 38 console.log('Max: ', statistics.max()) // 38
console.log('Range: ', statistics.range() # 14 console.log('Range: ', statistics.range() // 14
console.log('Mean: ', statistics.mean()) # 30 console.log('Mean: ', statistics.mean()) // 30
console.log('Median: ',statistics.median()) # 29 console.log('Median: ',statistics.median()) // 29
console.log('Mode: ', statistics.mode()) # {'mode': 26, 'count': 5} console.log('Mode: ', statistics.mode()) // {'mode': 26, 'count': 5}
console.log('Variance: ',statistics.var()) # 17.5 console.log('Variance: ',statistics.var()) // 17.5
console.log('Standard Deviation: ', statistics.std()) # 4.2 console.log('Standard Deviation: ', statistics.std()) // 4.2
console.log('Variance: ',statistics.var()) # 17.5 console.log('Variance: ',statistics.var()) // 17.5
console.log('Frequency Distribution: ',statistics.freqDist()) # [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34), (8.0, 33), (8.0, 31), (8.0, 24), (4.0, 38), (4.0, 29), (4.0, 25)] console.log('Frequency Distribution: ',statistics.freqDist()) // [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34), (8.0, 33), (8.0, 31), (8.0, 24), (4.0, 38), (4.0, 29), (4.0, 25)]
``` ```
```sh ```sh
@ -709,7 +709,7 @@ Standard Deviation: 4.2
Frequency Distribution: [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34), (8.0, 33), (8.0, 31), (8.0, 24), (4.0, 38), (4.0, 29), (4.0, 25)] Frequency Distribution: [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34), (8.0, 33), (8.0, 31), (8.0, 24), (4.0, 38), (4.0, 29), (4.0, 25)]
``` ```
1. Create a class called PersonAccount. It has firstname, lastname, incomes, expenses properties and it has total_income, total_expense, account_info,add_income, add_expense and account_balance methods. Incomes is a set of incomes and its description and the same goes for expenses. 1. Create a class called PersonAccount. It has firstname, lastname, incomes, expenses properties and it has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance methods. Incomes is a set of incomes and its description and expenses is also a set of expenses and its description.
🎉 CONGRATULATIONS ! 🎉 🎉 CONGRATULATIONS ! 🎉

Loading…
Cancel
Save