What is the answer if x=a x*=3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is the answer if x=a x*=3

12th Nov 2016, 10:40 PM
ADuffield
ADuffield - avatar
14 Answers
+ 7
x*=3 is the same as x = x*3 .. so we have that x=a, thus x*=3 will result in a*3
12th Nov 2016, 11:21 PM
Rebeka Asryan
Rebeka Asryan - avatar
+ 3
if x=a x*=3 if it will happen that x is same like a then x will be three times larger, or x=a x*=3 x has value of a and then x is multiplied by 3 (but "a" stays the same)
13th Nov 2016, 12:17 AM
Lukasz Kostrz
Lukasz Kostrz - avatar
+ 2
first you see that "x" has the value of "a" then x*=3 it's like saying x=x*3 so then the answer it's like saying a=a×3
13th Nov 2016, 12:38 AM
Leonardo Brenes Muñoz
Leonardo Brenes Muñoz - avatar
+ 1
Well, what does a equal?
12th Nov 2016, 10:43 PM
Keto Z
Keto Z - avatar
0
x = a x = x * 3 == 3a
13th Nov 2016, 11:14 AM
EagleEye
EagleEye - avatar
0
a variable can't store other variable like x=a here both are variables. if we have x='a' then x=x*3 gives value in x as 'aaa'.
1st Dec 2016, 5:40 PM
Dharm Vashisth
Dharm Vashisth - avatar
0
x = a is different from x = "a". If a is defined first, x will take a's value and then 3 times that value. Otherwise you will get an error message. However, if you meant to say x = "a", then most definitely you will get aaa as the new value for x.
10th Apr 2017, 1:30 PM
Fernando Soares
Fernando Soares - avatar
0
aaa
1st Jul 2019, 11:55 AM
Himangi
- 1
x *= 3 is the same as x = x * 3. so if a = 3 x would be 9.
12th Nov 2016, 10:43 PM
Edi Lipovac
Edi Lipovac - avatar
- 1
here, if the condition x=a is satisfied, then x will be replaced by x=x*3.
13th Nov 2016, 2:59 PM
Lakshmikanta Nath
Lakshmikanta Nath - avatar
- 1
x*=3 is the same as x=x*3. So if x="a", it'll be "a"*3 and the result will be aaa
16th Nov 2016, 6:41 PM
Hoshiki Shiro
Hoshiki Shiro - avatar
- 1
answer is aaa because x=a x*=3 means a*3 wich is finally 3a that is aaa
20th Nov 2016, 5:55 PM
FEROUZ KASSIM NSUBUGA
FEROUZ KASSIM NSUBUGA - avatar
- 1
a=a*3
23rd Nov 2016, 6:36 PM
Oshane Gordon
Oshane Gordon - avatar
- 2
aaa
8th Jan 2017, 5:08 AM
hackingmaster
hackingmaster  - avatar