Given a string input, output true if there are 2 b's in it, false if otherwise
'Macbeth' -> false
'Publius Cornelius Dolabella' -> true
Note: sometimes it's the littlest things that matter....
this is a great problem iff delivered as audio but not as video...
Liked it, emphasizes the old advice - examine the exam first, answer the exam later ...
But B is not the same as b!
The default call routine has numbers "2" but the check routine expects "two" to be the function call name.
I'm just curious, cause the description doesn't specify it clearly (and there is no test for this): what the output should be when input has more than two b's?
filename cannot start with a number.
Tricky problem - fools the solver with the function name...
FUNCTION NAME STARTS WITH A NUMBER! BLAH! CHANGE 2--> two
"cannot read input file 2_b_or_not_2_b.m " hence it failed to evaluate
why it displays cannot read input file.
change your file name to two_b_or_not_two_b
I'm getting the error: cannot read input file 2_b_or_not_2_b.m. I assume that this isn't on my end...
me too !
Sorry to steal the lead with this lame solution! I was trying different things before realizing the trick, and hadn't changed the solution back.
I can not submit my solution,it always says "failed to evaluate". Who can help me
need to change the function name to two_b_or_not_two_b
I think there is a problem with the test or tests, since even the default solution fails to evaluate with 'Parse error' indicated.
I agree. Function names cannot start with numbers, so this problem should be revised.
How many trades represent all the profit?
select the primes of a vector
frame of the matrix
What number has this problem?
Add a block to a model
Back to basics 26 - Keywords
Back to basics 19 - character types
Back to basics 25 - Valid variable names
Back to basics 17 - white space
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office