එක වේරියබල් එකකට ස්ට්රින්ග් එකක් දාල තව වේරියබල් එකකට int එකක් දාල දෙකම එක print කොඩ් එකක් ඇතුලෙ print කරොත් ඒක error එකක්ද එහෙම වැටෙන්නෙ නැතුව ඒක print කරගන්න විදියක් තියෙද
a = “10”
b = 2
print(a+b)
Inuka_UACode Starter
python varibale
Share
print(f'{a} {b}’) –solution—
print(a + b) mehema ba
thnx💖
javascript වල වගෙ නම් ඔහොම කරොත් concatenate වෙනව 102 කියල හැබැයි phyton වල concatenate වෙන්නෙ නෑ variable types 2ක් නිසා,a සහ b concatenate කර ගන්න ඕනි නම් print(a + str(b)) දෙන්න එතකොට output එක 102 එන්නෙ,නැත්තං integer value එකක් විදියට එකට add කර ගන්න ඕනි නම් print(int(a)+b) දෙන්න එතකොට 12 කියල එනව
thnx💖
print(int(a)+b)