This one is simple.
Ask for a number, and a string, and a Boolean. If the Boolean is
true, the program should convert all letters to lowercase, but should convert the nth letter in the string to uppercase, and the other way around.
procedure(2,"kodular",True) => kOdular
procedure(8,"this is fun",False) => THIS IS FUN #the 8th letter is a space
procedure(7,"this is fun",False) => THIS Is FUN
Cool to see another DC from you,
@Mateja! Love your idea and will try to solve it!
Hey, a question: What if the number exceeds text length? Any rules?
No, just ignore it and let Kodular return its own error
I don’t get what you are saying.
7, “this is fun” and False are inputs.
what do you mean
you need to obtain a Boolean, how could you return the Boolean?
I started to use procedure block frequently because of these DC. That’s great
Edit: It might not be the best and simplest solution but I
I used 33 blocks (just the procedure block)
Am late again…
anyway, here’s my
Proof of functionality:
with 53 blocks and without using YailLists
. Someone has a better one? (only the procedure)
Wait… have an error…
At this point, the variable names aren’t even funny anymore
Now it’s fixed…
Really? I always use these variable names bc of not mixing them with my actual variable names bc I make these DC procedures always in my own projects without opening another
Yeah ok I actually didn’t know if that works or not. But pls do what
@Mateja said and also how many blocks did you use?
Oh no I forgot
Hope not many people saw that
No worries, only 2 (
@Mateja an me)! See your views
I edited the post. I have 33 blocks in total.
33 blocks in total.
Cool! You use YailLists in the main code, right?
I’m sorry but I really duuno what YailLists are.