Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input('Qual o grau do polimonio?'))
- a = [0]*(n+1)
- for v in range(n, -1, -1):
- input_text = "Introduza um valor para o 'a' na ordem #%d" % v
- a[v] = int(input(input_text))
- x0 = int(input('Qual o valor de x?'))
- p = a[n]
- for z in range(n-1, -1, -1):
- p = p * x0 + a[z]
- str_out = '%d' % p
- print( str_out )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement