+ 1

in place operators

Wt is x=*3 if x=a

10th Nov 2017, 3:16 PM
Rhithesh Selvakumaran
Rhithesh Selvakumaran - avatar
29 Antworten
+ 35
First of all i don't think x=*3 is valid.. it should be x*=3 Assuming ur code as x="a" x*=3 The value of x will be aaa As it print a(initial value of x) 3 times
10th Nov 2017, 3:28 PM
Frost
Frost - avatar
+ 10
its invalid. Valid syntax is x*=3
19th Apr 2021, 7:33 AM
Pranay Sehgal
Pranay Sehgal - avatar
+ 7
Here X=*3 If X= a It returns an error Because X=*3 is an invalid syntax Valid are X+=, X-=, X*=, X/= Remember that "equals to(=)" should be last . X *=3 X ="a" Then it will return aaa as output Hope it helps :)
25th Jun 2021, 8:05 PM
Mounikareddy
+ 6
La manera correcta es: x = "a" x *= 3 Print(x)
18th Feb 2022, 2:15 PM
Alvaro Espinoza G.
Alvaro Espinoza G. - avatar
+ 3
aaa
20th Apr 2021, 4:03 AM
Ravi Pandey
Ravi Pandey - avatar
+ 3
If u want to avoid confusion... U just write simply x=x*3 insted of x*=3 x="a" x=x*3 Output : aaa
20th Apr 2021, 2:52 PM
G Gunasree
+ 2
Invalid syntax. Correct syntax: x *= 3 and x = 'a'
2nd Dec 2021, 4:56 PM
Prithviraj Kundu
Prithviraj Kundu - avatar
+ 1
Thank you
30th Apr 2021, 6:23 AM
Adriana Qaisara
Adriana Qaisara - avatar
+ 1
Ans = aaa
18th Jan 2022, 11:32 PM
‎Redemption Chikezie
‎Redemption Chikezie - avatar
+ 1
aaa
7th Mar 2022, 9:56 AM
Honeycrown
+ 1
aaa
22nd Mar 2022, 7:07 AM
Khalid Hasan
Khalid Hasan - avatar
0
x=a x=*3 x=x*3 x represents a So a*3=aaa
27th May 2021, 12:22 PM
Travis Business
Travis Business - avatar
0
x='a' x*=3 pint(x) out=aaa A will be repeat three times
19th Jun 2021, 11:35 AM
Sameer Shaik
Sameer Shaik - avatar
0
tnx all
12th Jul 2021, 5:51 PM
md emon
md emon - avatar
0
If x is a char X*=3 That is In print format('x'+'x'+'x') We get xxx If x=2 is int so we get 2+2+2=6
17th Jul 2021, 2:28 PM
Bharath Lalam
Bharath Lalam - avatar
0
Integer multiply* text equal= repeat text. example: x= "a" x*=3 >>>output : aaa
5th Oct 2021, 5:54 AM
Sarmad Saad
Sarmad Saad - avatar
0
Since "a" is a string, what it means is that we would have to change the formal/previous or initial input of x which was a to multiple of 3. By the way, it should have read x*=3. If x=a: x*=3 Simply put ; we are required to change the initial value of x to a then do the multiple of it by 3 times Output ="a" + " a" + " a" = aaa since it's string.
19th Oct 2021, 7:55 PM
Craig Lieson
Craig Lieson - avatar
0
X=a X*=3 Print(x) aaa
26th Oct 2021, 11:41 PM
Andres Gonzáles
Andres Gonzáles - avatar
0
A replaces x so a*3 =aaa
29th Oct 2021, 3:23 AM
Steven Whitacre
0
aaa
15th Nov 2021, 2:43 AM
Khalid Alanazi
Khalid Alanazi - avatar