Giter VIP home page Giter VIP logo

oop_lws's People

Watchers

James Cloos avatar

oop_lws's Issues

Замечания по Radix

ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('')
ALPHABET_REGEXP = /[A-Za-z]/
def radix(source_notation, destination_notation, value)
if value =~ ALPHABET_REGEXP
raw_number = value.split('').map {|sym| sym =~ ALPHABET_REGEXP ? ALPHABET.index(sym) + 10 : sym.to_i}
number = MultiSystemNumber.new(nil, source_notation, raw_number)
else
number = MultiSystemNumber.new(value, source_notation)
end
result_number = number.to_system(destination_notation).map do |num_digit|
num_digit > 9 ? ALPHABET[num_digit - 10] : num_digit
end
value[0] == '-' ? result_number.unshift('-').join : result_number.join
end

  • Сделать проще, без регулярок

Замечания по программе Car

  • При вводе неизвестных команд или команд с ошибками, сообщение, выводимое пользователю, должно быть более информативным

Замечание по Dictionary

  • Не надо привязываться к набору символов. Просто словарь должен хранить преобразовывать одни строки в другие

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.