[Python applying learnings from 1..6] update file(add space)
This commit is contained in:
parent
9c7d1f4909
commit
f7e0d8cb08
2 changed files with 4 additions and 2 deletions
|
@ -12,11 +12,11 @@ def input_and_calculate_one_line():
|
||||||
|
|
||||||
sp_number = number.split(' ')
|
sp_number = number.split(' ')
|
||||||
for i in range(len(sp_number) - 1):
|
for i in range(len(sp_number) - 1):
|
||||||
txt_result = txt_result + sp_number[i] + '+'
|
txt_result = txt_result + sp_number[i] + ' + '
|
||||||
|
|
||||||
sp_number = list(map(int, sp_number))
|
sp_number = list(map(int, sp_number))
|
||||||
result = sum(sp_number)
|
result = sum(sp_number)
|
||||||
txt_result = txt_result + str(sp_number[-1]) + '=' + str(result) + '\n'
|
txt_result = txt_result + str(sp_number[-1]) + ' = ' + str(result) + '\n'
|
||||||
return txt_result
|
return txt_result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -133,3 +133,5 @@ How to use Accessing Elements of Lists
|
||||||
practice function, while, if
|
practice function, while, if
|
||||||
**** ex36
|
**** ex36
|
||||||
some rules of if, loop and tips for debugging
|
some rules of if, loop and tips for debugging
|
||||||
|
*** Python applying learnings from 1..6
|
||||||
|
create calc.py
|
||||||
|
|
Loading…
Reference in a new issue