Skip to content

Conversation

@FernandoBertoldi12
Copy link

Versão atualizada da Calculadora-TK.
Com as funções de logaritmo, percentual, fatorial, seno, cosseno, tangente e conversões para números binários, hexadecimais e octais.

Versão atualizada da Calculadora-TK. 
Com as funções de logaritmo, percentual, fatorial, seno, cosseno, tangente e conversões para números binários, hexadecimais e octais.
Copy link
Owner

@matheusfelipeog matheusfelipeog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obrigado pela sua contribuição @FernandoBertoldi12 😄

Bem, creio que houve pequeno desvio aqui. A ideia é manter apenas uma quantidade de operações matemáticas conforme os botões disponíveis, que no momento são 2. Isso é para forçar que seja uma calculadora simples (não tenho a intenção de transformar em uma calculadora científica no momento, talvez no futuro) e não necessite de mudanças no layout.

Portanto, peço que mantenha apenas as operações de % e log conforme a issue #6 e remova as demais. Você pode fazer isso, por favor?

Além disso, tem algumas pequenas revisões gerais abaixo. Peço que as resolva também.

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-

import math
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Siga o mesmo padrão nas importações. Mova essa linha para junto dos imports Builtins abaixo.

Comment on lines +265 to +273
self._BTN_PORCENT = tk.Button(master, text='%', cnf=self.theme['BTN_OPERADOR'])
self._BTN_LOG = tk.Button(master, text='log', cnf=self.theme['BTN_OPERADOR'])
self._BTN_FAT = tk.Button(master, text='!', cnf=self.theme['BTN_OPERADOR'])
self._BTN_SIN = tk.Button(master, text='sin', cnf=self.theme['BTN_OPERADOR'])
self._BTN_COS = tk.Button(master, text='cos', cnf=self.theme['BTN_OPERADOR'])
self._BTN_TAN = tk.Button(master, text='tan', cnf=self.theme['BTN_OPERADOR'])
self._BTN_BIN = tk.Button(master, text='bin', cnf=self.theme['BTN_OPERADOR'])
self._BTN_OCT = tk.Button(master, text='oct', cnf=self.theme['BTN_OPERADOR'])
self._BTN_HEX = tk.Button(master, text='hex', cnf=self.theme['BTN_OPERADOR'])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Há uma repetição de código aqui. Os botões já foram atribuídos algumas linhas acima. Você pode remover esse trecho?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants