0

code which make result like this

hi i need code which make result like this + +++ +++++ +++++++ +++++++++

20th Dec 2017, 11:51 PM
zura bakuradze
zura bakuradze - avatar
2 Answers
+ 6
import sys k = 1 for i in range(5): for j in range(k): sys.stdout.write('+') print() k += 2
21st Dec 2017, 12:03 AM
Vukan
Vukan - avatar
+ 2
@Vukan Instead of importing sys you can use print(end="") instead.
21st Dec 2017, 2:16 AM
LunarCoffee
LunarCoffee - avatar