- ๐ Hi, Iโm @sa-adebayo
- ๐ Iโm interested in ...
- ๐ฑ Iโm currently learning ...
- ๐๏ธ Iโm looking to collaborate on ...
- ๐ซ How to reach me ...
rubytrack's Introduction
rubytrack's People
rubytrack's Issues
11. Pascal - Yield
Print Pascal's triangle using 'yield'.Eg: pascal(6) gives:1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Pascal
6. Vehicle - Subclass
Define a class named 'Vehicle' consisting of 'name','price' and methods for initializing and showing contents. The 'price' of Vehicle may change over time. Now create a subclass 'Bike' having 'dealer' and method to show its content. Initialize a Bike class object with certain values and then change its price.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Vehicle
13. Factorial - Ranges
Rewrite factorial method using ranges.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Factorial
15. Prime Numbers
Step Define a method to find all prime numbers upto n using 'step' function.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Prime
3. Fibonacci - Yield
Fibonacci Series up to 1000 using 'yield'.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Fibonacci
16. Highlight Search Result
Write a search method that searches for a letter or word in a user input string and highlights the searched element. Also it should display the total no of searches found.
Eg: If user enters string to be searched as "Can you can a can as a canner can can a can?" and word to be searched is 'can' then output should be:(Can) you (can) a (can) as a (can)ner (can) (can) a (can)?Total Occurences found: 7
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Highlight
18. Sum Time - Splat Methods
Modify the sum of times method for any number of time values passed to this method.
Eg: ("11:23:07","22:53:45","0:23:23","23:45:56") -> "2 day & 10:26:11" ("11:23:07") -> "11:23:07"
https://github.com/adebayo-dealdey/RubyTrack/tree/master/SumTimes
7. Inverse Case
Overwrite the default 'to_s' method such that it inverses the case of each letter.Eg: "hello WORLD".to_s -> "HELLO world"
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Inverse
12. Character Count - Ranges
Write a method that returns the no of various lowercase, uppercase, digits and special characters used in the string. Make use of Ranges.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Ranges
17. Sum Time
Write a method that sums up 2 24-hour time values(h:m:s). Validate the time using regular expressions.Eg: ("0:45:34","0:15:58") -> 01:01:32 ; ("11:23:07","22:53:45") -> 1 day & 10:16:52
https://github.com/adebayo-dealdey/RubyTrack/tree/master/SumTime
4. Palindrome
Output whether the input string is palindrome. The program quits when user enters 'q/Q'.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Palindrome
5. Customer Account Balance
Define a class Customer having three variables "name","account_no" & "balance". It must initialise the class object with the name of the customer, auto-increment the account no and set balance to 1000. Define methods deposit() and withdraw() for this class.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Customer
20. Factorial - Exception Catcher
Add exception handling for negative numbers in factorial program.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/NegativeFactorial
10. Hash - Inject
Write a method that groups the above hash into 2 groups of 'even' and 'odd' length using 'inject'.Eg: ['abc','def',1234,234,'abcd','x','mnop',5,'zZzZ'] -> {odd: [["x", 5], ["abc", "def", 234]], even: [[1234, "abcd", "mnop", "zZzZ"]]}
https://github.com/adebayo-dealdey/RubyTrack/tree/master/EvenOdd
22. CSV
Read a CSV file:
Name, EmpId, Designation
Jack,15,Developer
Mary,13,Designer
Johny,19,Tester
John,12,Developer
Jane,17,Designer
Segun,31,Ruby Developer
Daniel,32,Ruby Developer
Ayola,34,Mobile Developer
Save into another file in the format:
Designer
Mary (Employee Id: 13)
Jane (Employee Id: 17)
Developer
Jack (Employee Id: 15)
John (Employee Id: 12)
Mobile Developer
Ayola (Employee Id: 34)
Ruby Developer
Segun (Employee Id: 31)
Daniel (Employee Id: 32)
Tester
Johny (Employee Id: 19)
Listing should be in ascending order of Designation.
Designation should be plural if it has more than one Employee.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Csv
1. Occurence - Hash
Count the occurrences of various alphabet letters in an input string and store it in hash.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/1Hashes
19. Interest Difference
Create a class Interest that gives the user the difference in amount calculated simply and compoundedly. Initialise class with a block. 'p' and 't' are entered by user. Take 'r' = 10% pa.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Interest
21. Name - Raise
Create a class 'Name' with two attributes firstname and lastname. Neither of them can be blank and the first letter of firstname must be capital. Implement using 'raise'.Try using custom Exceptions.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Name
8. Power - Array
Define a method power() for an array. It takes an argument 'x' and returns the array with elements raised to power 'x'. Try to make use of array functions.
Eg: [1,2,3,4,5,6].power(3) -> [1, 8, 27, 64, 125, 216]
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Power
14. Reverse Sentence
Use string methods to reverse the words arrangement in a sentence.Eg: "An apple a day keeps the doctor away" -> "away doctor the keeps day a apple An"
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Reverse
9. Array - Hash
Create a method for Array that can create a hash having 'key' as length of the element and value as an array of all the elements of that length. Make use of for-in loop for the purpose.Eg: ['abc','def',1234,234,'abcd','x','mnop',5,'zZzZ'] should give result as {3=>["abc", "def", 234], 4=>[1234, "abcd", "mnop", "zZzZ"], 1=>["x", 5]}
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Hash
2. Replace - Regex
Ask user to enter text. Replace each vowel in the text with a '*' using regular expression.
https://github.com/adebayo-dealdey/RubyTrack/tree/master/Regex
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.