Posts by Mateus • 119 points
5 posts
-
2
votes1
answer1010
viewsQ: Use from module import* vs use import module in python 3
The 2 do the same thing (I think at least), but have always told me that import module is better then I always used this method, but the method from module import * makes the code more concise since…
-
0
votes5
answers9375
viewsQ: Program to find MMC in Python
I was doing a basic exercise for the function While, he asked to create a program that found the MMC between 2 numbers... I managed to do, but the program continues to print the answer non-stop on…
-
2
votes1
answer410
viewsQ: Storing values of variables within the while function
In an exercise I answered with this code: qntd_alunos = int(input("Digite a quantidade de alunos: ")) qnt = 0 while qnt <= qntd_alunos-1: MB1 = float(input("Digite a média do primeiro bimestre:…
-
2
votes2
answers12373
viewsQ: "perfect" square root in python and identify the rest:
It is for python 3: What I’m looking to do is show the rest of a square-root account that only accepts as many integers as possible as an answer. For example: import math x=math.sqrt(87) print(x)…
-
4
votes3
answers2297
viewsQ: Python 3 make the program find out how much of a given digit is in a string or a number
It’s for python 3: I’m trying to make a very basic program to find out how much of a given digit is in a string or a number. For example, if the user writes 1200, I want to print-"your number has 2…