herikipaji
JF-Expert Member
- Aug 23, 2016
- 1,198
- 1,364
Salaam wataalamu!
Cheki hizi Python code ...
def print_two(*args):
arg1, arg2 = args
print "arg1: %r, arg2: %r" % (arg1, arg2)
def print_two_again(arg1, arg2):
print "arg1: %r, arg2: %r" % (arg1, arg2)
def print_one(arg1):
print "arg1: %r" % arg1
def print_none():
print "I got nothin'."
print_two("Lipokera","Kamanzilano")
print_two_again("Lipokera","Kamanzilano")
print_one("First!")
print_none()
Narun na Linux inakubali hivi output ..
arg1: 'Lipokera', arg2: 'Kamanzilano'
arg1: 'Lipokera', arg2: 'Kamanzilano'
arg1: 'First!'
I got nothin'.
Nikirun kwenye Ubuntu tu shida inaanza inaandika hivi..
File "try.py", line 3
arg1, arg2 = args
^
IndentationError: expected an indented block
Inakuaje Linux inakubali safi error ije na Ubuntu tu?
Naona kama maajabu haya au Python inabagua OS?
Mwenye mwanga aniangazie tafadhari.
Cheki hizi Python code ...
def print_two(*args):
arg1, arg2 = args
print "arg1: %r, arg2: %r" % (arg1, arg2)
def print_two_again(arg1, arg2):
print "arg1: %r, arg2: %r" % (arg1, arg2)
def print_one(arg1):
print "arg1: %r" % arg1
def print_none():
print "I got nothin'."
print_two("Lipokera","Kamanzilano")
print_two_again("Lipokera","Kamanzilano")
print_one("First!")
print_none()
Narun na Linux inakubali hivi output ..
arg1: 'Lipokera', arg2: 'Kamanzilano'
arg1: 'Lipokera', arg2: 'Kamanzilano'
arg1: 'First!'
I got nothin'.
Nikirun kwenye Ubuntu tu shida inaanza inaandika hivi..
File "try.py", line 3
arg1, arg2 = args
^
IndentationError: expected an indented block
Inakuaje Linux inakubali safi error ije na Ubuntu tu?
Naona kama maajabu haya au Python inabagua OS?
Mwenye mwanga aniangazie tafadhari.