NA'URA MAI ƘWAƘWALWA 02


Na'ura Mai kwa-kwalwa
      Kashi Na Biyu

(Python) Programming Language.

Daga Salisu Abdulrazak Saheel

Python programming language ne da muke abubuwa da dama dashi sai dai yanada wahala idan baka maida hankali ba sosai idan kuma ka maida hankali to lallai yanada sauqi, zaka iya amfani dashi wajen gina website dinka..
Ga kadan daga cikin bayani akan Python (Programming Language)

Gaskiya dokokin Python sunada dan wahala musamman idan mutum bai maida hankali sosai ba akanshi...
saboda a programming akwai abinda ake cewa (White Space) toh gaskiya a Python babu wannan abun kuma ana kiranshi da (Indentifiers) a yaren Python saboda ana amfani da space da kuma paragraph (sakin layi) wajen baiwa yaren umarni, 
abinda nake nufi da hakan shine misali idan ka cikin rubuta module ko block to idan kayi sakin layi hakan yana nufin kagama da wannan block din kenan
haka kuma indentifiers
misali mu dauki wannan code din
if 5 > 2:
 print("Five is greater than two!")
if 5 > 2:
print("Five is greater than two!")
if 5 > 2:
print("Five is greater than two!")
if 5 > 2:
  print("Five is greater than two!")
if 5 > 2:
   print("Five is greater than two!")
a cikin wannan misalan dana baka akwai block guda 2 da zasu baka error wajen printing shin ko zaka iya fadamin me yasa?

Ok bari nayi maku bayani da farko nayi amfani da "if statement" wajen gwada tsakanin "2" da "5" wanne yafi wani girma idan "5" yafi "2" shin zai nuna min cewar "5" is greater than "2" ...?
Misali idan ka yi code dinka kamar haka:
if 5 > 2:
print("5 is greater than 2")
Wannan code din zai baka error saboda if da print suna kan layi guda (the same line of code) idan kana coding da computer zaka fahimci abinda nake nufi..
Misali ka lura da code din yanzu zan saka space kafin na saka print
if 5 > 5:
 print("5 is greater than 2")
Ka luraSaheel
Ba space (tazara) kafin na rubuta print..

08137350232.. Whatssp Only.
@ASOF2020 Whatsapp 08038485677
Post a Comment (0)