how to pass multiple arguments in "include?" method in ruby | SoloLearn: Learn to code for FREE!

+1

how to pass multiple arguments in "include?" method in ruby

#DATE IN MARCH 21(YEAR)Y/MONTH/D reg="21MAR03" invalid = false if reg.length != 7 invalid = false elsif reg[0..1].include?("21") && reg[2..4].include?("MAR") #HOW CAN I INCLUDE 20 IN THE CODE #LIKE include?("21","20") && reg[2..4].include?("MAR") #ITS NOT WORKING puts "valid" invalid = true end if invalid==false puts "invalid" end

3/3/2021 11:22:23 AM

MANIFEST

2 Answers

New Answer

+1

i would help you if i knew but do you know how to do the python for begniers search engine?

0

I have an idea how it works but don't know how to do exactly...