Post

Python Programming
Python Programming@PythonPr·
What is the Output? a = " 123 " b = int ( a ) print ( b+2 )
English
14
8
56
16.7K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: 125 Solution: `a` is a string, ie, a sequence of characters. It has the characters 1, 2, and 3. These are digits, but `a` is still not treated as a number. For python to treat it as a number, it needs to be converted to a numeric type. That is exactly what +
English
1
0
2
405
Gopuff
Gopuff@gopuff·
Your first Gopuff order gets $0 delivery, plus 100s of deals once you're in. 5,000+ products, no markups, delivered in as fast as 15 minutes.
English
29
18
411
3.6M
ح
ح@Gullaaay_·
@PythonPr People who picked 'Error' need to run the code before answering...🫡
English
0
0
1
174
5choices
5choices@computer4guy·
@PythonPr I thought you said learning to code is dead
English
0
0
1
252
Cyber_Emmanuel
Cyber_Emmanuel@CEmmanuel66646·
@PythonPr a = "123" # a is a string b = int(a) # Converts the string "123" to the integer 123 print(b + 2) # 123 + 2 = 125
English
0
0
1
119
Paylaş