Ir para conteúdo
Fórum Script Brasil

Alexandre Attyla

Membros
  • Total de itens

    4
  • Registro em

  • Última visita

Sobre Alexandre Attyla

Alexandre Attyla's Achievements

0

Reputação

  1. Eu não tenho certeza sobre como resolver esse erro de sintaxe while T or M >=0: X = (random.randrange (1,3))+(random.randrange (1,3)) if X == 2: T = (T + 1) if X == 3: M = (M + 1) if X == 4: T = (T + 1) if X == 2: M = (M - 2) if X == 3: T = (T - 1) and M = (M - 1) if X == 4: T = (T - 2) print (T, M) SyntaxError: can't assign to operator Se alguém puder me ajudar a resolver, vai ser de grande ajuda, ainda sou bem iniciante em Python
  2. Eu não tenho certeza sobre como resolver esse erro de sintaxe while T or M >=0: X = (random.randrange (1,3))+(random.randrange (1,3)) if X == 2: T = (T + 1) if X == 3: M = (M + 1) if X == 4: T = (T + 1) if X == 2: M = (M - 2) if X == 3: T = (T - 1) and M = (M - 1) if X == 4: T = (T - 2) print (T, M) SyntaxError: can't assign to operator Se alguém puder me ajudar a resolver, vai ser de grande ajuda, ainda sou bem iniciante em Python
  3. Muito obrigado! Eu tinha conseguido arrumar esse erro, mas durante a produção entrei em outro erro :( O interpretador continua dando o erro SyntaxError: can't assign to operator Mas eu não consigo achar a causa e muito menos a solução. O código é esse: while T or M >=0: X = (random.randrange (1,3))+(random.randrange (1,3)) if X == 2: T = (T + 1) if X == 3: M = (M + 1) if X == 4: T = (T + 1) if X == 2: M = (M - 2) if X == 3: T = (T - 1) and M = (M - 1) if X == 4: T = (T - 2) print (T, M)
  4. Eu estou tentando fazer um pouco de codigo pra resolver esse problema de matematica, mas ele continua me dando o seguinte erro: SyntaxError: unindent does not match any outer indentation level O código completo é esse: while (T, M) >=0: X = random.randrange (1,3)+random.randrange (1,3) if X == 2: T + 1 if X == 3: M + 1 if X == 4: T + 1 if X == 2: M - 2 if X == 3: (T - 1)(M - 1) if X == 4: T - 2 print (T, M)
×
×
  • Criar Novo...