#Java script (question)

77 messages · Page 1 of 1 (latest)

noble ermine
#

Alex wants to come up with a system to encode program languages. They decide to set C=10.
From this, RUBY = 94 and RAILS = 94. What does JAVASCRIPT equal? #1023632039829831811

fluid tokenBOT
#

Hey, @noble ermine!
Please remember to /close this post once your question has been answered!

mild valve
noble ermine
deft briar
#

how does this relate lol

#

there is no logic ??

mild valve
#

My guess is that we are suppose to find the pattern

#

how are these strings mapping to ints based on the given information.

#

hint: think about what it means to map C to 10 and what that might imply for other letters

deft briar
#

arent there many ways and just hard to find the correct

mild valve
#

It's pretty logical it just takes a bit of experimenting

mild valve
deft briar
#

cause C and javascript and ruby are programmig languages

mild valve
#

if C is 3

#

then A is 1

#

if C is 7 the A is 4

#

what is going on here where is the pattern?

#

well if you can imagine a little bit, you can give a value to each letter in the alphabet based on where it's located. For instance, A is the first letter so it's value is 1, B is 2, C is 3.

noble ermine
#

This question totally frustrating me

mild valve
mild valve
#

You do this in Java when indexing an array

#

It's index is the value based on where it's located in that array

noble ermine
#

Tbh ,i am beginner

mild valve
#

ah okay

noble ermine
#

I am totally confused with this question

mild valve
#

okay so giving that each letter has a value

#

A is 1 B is 2 C is 3

noble ermine
#

I'm grateful if you could help

mild valve
#

All the way up to Z

noble ermine
#

Ok

mild valve
#

All they did was add four to all the values

#

4

#

since C is 7

noble ermine
#

But in question they given c 7 ?

mild valve
#

A must be 5

#

B must be 6

noble ermine
#

Ok

mild valve
#

that that's all they did

#

and then they give you a word assuming you see it as addition

#

and all you're doing is adding each of the letters up

#

based on their new values

noble ermine
#

Oh

mild valve
noble ermine
#

You mean
R + U + B + Y = 94?

mild valve
#

yep

noble ermine
#

Oh then ,it's interesting

#

Yeah i have solved play cipher codes before that

#

I think let's assign
A = 3
B = 5

mild valve
#

not sure that's what you want to do but go for it

#

with questions like these it's all about coming up with your own logic and seeing if it's applicable

noble ermine
mild valve
mild valve
#

you are adding 7 to each of the values

#

that's why C is 10

#

because it

#

the 3rd letter and 7 + 3 is 10

noble ermine
#

I realised

mild valve
#

so it would be (A, 8), (B, 9) (C, 10) and so on

noble ermine
#

C = 10

#

I have assigned c = 7

#

Sorry

#

Let me try

#

Bro ty

#

It's working

mild valve
#

yep no problem

noble ermine
#

Let me try for rails

#

@mild valve ty so much bro ,it's working

mild valve
#

great, glad to help. if thats all you can close the channel using /unreserve