JessyOw

55 Reputation

5 Badges

9 years, 115 days

MaplePrimes Activity


These are questions asked by JessyOw

>teksbiasa:=`Hello!`;

teksbiasa:=Hello!

>nilaiASCII:=convert(teksbiasa,bytes);

nilaiASCII:=[72,101,108,108,111,33]

>E:=nilaiASCII+~nops(nilaiASCII);

E:=[78,107,114,114,117,39]

 

Hi, how i need to modify my command so the length of each word can be detected if enter a sentence instead of 1 word ?

For example, if i entered >> `Hello! Bob`, so the length of each word is [6, 3], so what i need is

 

>teksbiasa:=`Hello! Bob`;

teksbiasa:=Hello! Bob

>nilaiASCII:=convert(teksbiasa,bytes);

nilaiASCII:=[72, 101, 108, 108, 111, 33, 32, 66, 111, 98]

and my E will be >> E:=[72+6, 101+6, 108+6, 108+6, 111+6, 33+6, 32, 66+3, 111+3, 98+3] which is >>

E:= [78, 107, 114, 114, 117, 39, 32, 69, 114, 101]

Thanks for help~=]]
Have a nice day~=]]

 

>nombor1:=[4,6,2];

nombor1:=[4,6,2]

 

Hi, anyone know hot i need to continue my command to get 462 from [4,6,2]?

Thank you~=]]

>mylist:=462;

mylist:=462

>kekuncirahsia:=proc(n) local c,d,r,sum; c:=n; while (c>9) do sum:=0; d:=c; while (d>9) do r:=irem(d,10); sum:=sum+r; d:=iquo(d,10);od; c:=sum+d;print(c);od;end;

>kekuncirahsia(mylist);

12

3

 

Hi, anyone know how i need to write my command to get this >> kekuncirahsiafinal:=3

I just want it to print the last digit..

Thank you~=]]

>mylist:=468;

mylist:=468

 

Hi, how i need to continue my command to get [4,6,8] from 468?

Thank you~=]]

>teksbiasa:=`Kriptografi`;

teksbiasa:=Kriptografi

>nilaiASCI:=convert(teksbiasa,bytes);

nilaiASCII:=[75,114,105,112,116,111,103,114,97,102,105]

>kekuncirahsia:=3;

kekuncirahsia:=3

 

Hi, anyone know how i need to continue my command to add in kekuncirahsia(3) into nilaiASCII?
What i want to get>>[78,117,108,115,119,115,106,117,100,105,108]

Thank you, Have a nice day~=]]

1 2 3 Page 2 of 3