Comment your answers below! #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience
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.
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.
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
String concatenation disguised as arithmetic. ‘72’ − ‘27’ = 45 — the kind of trick that reminds you why context matters in both code and cognition.”
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…
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 ```
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
- 1. Marshawn Kneeland 33.1K posts
- 2. Nancy Pelosi 41.9K posts
- 3. #MichaelMovie 50.2K posts
- 4. Craig Stammen N/A
- 5. #NO1ShinesLikeHongjoong 32.8K posts
- 6. #영원한_넘버원캡틴쭝_생일 32.2K posts
- 7. Baxcalibur 4,860 posts
- 8. ESPN Bet 2,753 posts
- 9. Gremlins 3 3,912 posts
- 10. Chimecho 7,063 posts
- 11. Joe Dante N/A
- 12. Dallas Cowboys 12.7K posts
- 13. Chris Columbus 3,495 posts
- 14. #LosdeSiemprePorelNO N/A
- 15. #thursdayvibes 3,412 posts
- 16. Jaafar 14.7K posts
- 17. VOTAR NO 27.2K posts
- 18. Pujols N/A
- 19. Unplanned 8,477 posts
- 20. She's 85 1,096 posts
Something went wrong.
Something went wrong.