0
Want to do a project any ideas
7 Respuestas
+ 6
Credit Card Validator - Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum).
+ 4
calculator,
to-do-list,
tasks manager,
tic tac toe(AI vs human),
weather app, etc.
+ 3
Fortune Teller (Horoscope) – A program that checks your horoscope on various astrology sites and puts them together for you each day.
+ 2
sudoku, mastermind
+ 1
n = gets.strip.chomp # Ruby: Card Validator (Luhn ISO/IEC 7812)
_isin = n.reverse.upcase.chars.map{ |chr| id = [*?0..?9, *?A..?Z].rindex(chr); id > 9 ? [id / 10, id %10] : id }.flatten.map.with_index{ |elem, id| num = id.even? ? elem : elem * 2; num > 9 ? num - 9 : num }.reduce(:+) %10 == 0 # ⛑️bopoh13, Sep 27 2018
0
thanks
0
any other suggestions?