This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Perguntar o fator e a variavel | |
fat = input("Digite o fator comum: ") # "x²+3x" | |
var = input("Digite a variavel usada no fator comum: ") # "x" | |
#Salvar o texto da fat antiga para remover o x² do x²+3x e contar quantos veses repete o "x" | |
fat2 = [fat] | |
vc = int(fat.count(var)) | |
#verificar e pegar os valores que importao do primeiro x ("x²"+3x) | |
while vc > 0: |