Answer: A) 45 The trick: p and q are strings, not numbers! › p+q = "7"+"2" = "72" (concatenates) › q+p = "2"+"7" = "27" (concatenates) › int("72")-int("27") = 72-27 = 45 For beginners: + concatenates strings! If they were numbers, p+q=q+p and result would be 0.


BudapestMemorandum ry A non-profit civic organization registered in Finland. We bring together citizens, artists, and technologists, guided by humanitarian, non-partisan, and long-term values.

bpmorandum's tweet image. BudapestMemorandum ry A non-profit civic organization registered in Finland. We bring together citizens, artists, and technologists, guided by humanitarian, non-partisan, and long-term values.

Answer is: A. 45 For More Reference =>>

KumarT00623760's tweet image. Answer is: A. 45
For More Reference =>>

45 Both p and q are defined as strings. The plus sign with strings concatenates them. Thus print(p+q) = 72 print(q+p) = 27 Later these output are type cast to int to perform subtraction which yields 45


Answer:-(A)45 Here p and q are two strings. Step1:- p+q means concatenate two strings So, p+q="72" then convert it into integer. So first part become 72(int). Step2:- q+p="27" again convert it in integer 27. Step3:- 72-27= 45 So correct answer is 45.


A. int("72“) - int(“27“) 72-27 45


p = "7" q ="2" print(int(p+q) - int(q+p)) #(7 + 2) = 72 - (2 + 7) = 27 # 72 - 27 = 45 #A) 45 72 -27


A. 45 1st it will concentrate the string then converted into integer So 72-27 =45


Answer: A Concatenate p and q respectively because not are strings then subtract the results which are integers , it gives you 45.


Stream, call, game, and work in even the most remote locations. Order online in minutes


I don't know Python, buhh I think it's 45 Am I right??🫣


String concatenation disguised as arithmetic. ‘72’ − ‘27’ = 45 — the kind of trick that reminds you why context matters in both code and cognition.”


45, its str


It is a not number,it is a string P="7" q="2" Print(int(p+q)-int(q+p)) P+q=72 q+p=27 72-27=45 Ans:45


Your are concatenating the strings, then subtracting after converting the concatenated strings to integers. So your result is 45


Our rotating faucet extension makes everyday tasks easier! shop now:kleinita.com/products/rotat…


@grok if int is not included what's the answer and give reasons


Error I guess 🤣


Step 1: String concatenation · p + q = "7" + "2" = "72" · q + p = "2" + "7" = "27" Step 2: Convert to integers · int(p+q) = int("72") = 72 · int(q+p) = int("27") = 27 Step 3: Perform subtraction · 72 - 27 = 45 Final Answer: ``` 45 ```


Answer is A) 45


p = "7" and q = "2" are strings. p + q concatenates to "72", and q + p concatenates to "27". int(p + q) - int(q + p) converts these to integers and subtracts: int("72") - int("27") = 72 - 27 = 45.


United States Trends
Loading...

Something went wrong.


Something went wrong.