I need to print a Christmas tree that looks like this:
/\ / \
/ \
Here is my code so far:
for count in range (0,20):variable1 = count-20variable2 = count*2print('{0:{width1}}{1:{width2}}' .format('/','\\', width1=variable1 , width2=variable2))
I am using Python 3.5. And the coding says Sign not allowded in sstring format specifier
import builtins
builtins.unicode = str
print (' ',chr(0x2605))
for count in range (20):print ('{0:>{width1}}{1:>{width2}}' .format('/','\\', width1 = 20-count , width2 = 2*count+1))
print ('-----------------------------------------'
print (' [ ] ')
print (' [ ] ')
print (' [ ] ')
print (' [ ] ')
print (' [ ] ')
print ('-----------------------------------------')
Thank You for the People that helped me FINISH!