print('The program runs a chaos program with 3.9 and prints N output.')
print('With 3 formulas.')
# Get User's input
n = eval(input('How many times you want to loop? '))
x = eval(input('Enter a number: '))
# Print Label
print('{0:0} {1:0} {2:0} {3:0}'.format('Times','Formula1','Formula2', 'Formula3'))
# Loop to 10
for i in range(n):
x1 = 3.9 * x * (1 - x) # Chaos formula - Logistic formula
x2 = 3.9 * (x - x * x)
x3 = 3.9 * x - 3.9 * x * x
print('{0:0} {1:7} {2:7} {3:7}'.format(i, x1, x2, x3))`
When I run this, it comes up with ValueError: '=' alignment not allowed in string format specifier at line
print('{0:0} {1:0} {2:0} {3:0}'.format('Times','Formula1','Formula2', 'Formula3'))
When I deleted this String Format Specifier line, it worked well.
Do you have any idea about it?
Sorry about the wrong place to ask. I don't know how to delete it.
Hi all,
I have an issue with string format specifier.
`def chaosThree():
Instruction
When I run this, it comes up with ValueError: '=' alignment not allowed in string format specifier at line
print('{0:0} {1:0} {2:0} {3:0}'.format('Times','Formula1','Formula2', 'Formula3'))
When I deleted this String Format Specifier line, it worked well.
Do you have any idea about it? Sorry about the wrong place to ask. I don't know how to delete it.
Thanks.