+ 1
in place operators
Wt is x=*3 if x=a
29 Respostas
+ 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
+ 10
its invalid.
Valid syntax is x*=3
+ 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 :)
+ 6
La manera correcta es:
x = "a"
x *= 3
Print(x)
+ 3
aaa
+ 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
+ 2
Invalid syntax. Correct syntax: x *= 3 and x = 'a'
+ 1
Thank you
+ 1
Ans = aaa
+ 1
aaa
+ 1
aaa
0
x=a
x=*3
x=x*3
x represents a
So a*3=aaa
0
x='a'
x*=3
pint(x)
out=aaa
A will be repeat three times
0
tnx all
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
0
Integer multiply* text equal= repeat text.
example:
x= "a"
x*=3
>>>output : aaa
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.
0
X=a
X*=3
Print(x)
aaa
0
A replaces x so a*3 =aaa
0
aaa