Posts by Leandro Sargi • 67 points
8 posts
-
-2
votes1
answer31
viewsQ: Positional path error in Python3
I’m doing a test code for python, and I’m getting the following error: Traceback (Most recent call last): File "test.py", line 7, in g= test('Type a number: ') Typeerror: test() Missing 2 required…
python-3.xasked Leandro Sargi 67 -
0
votes1
answer103
viewsQ: Script to detect prime numbers in Python
I decided to create a script to detect prime numbers, but in order to really understand what I’m doing I created something from scratch, something I thought. At first my program worked, but I…
-
-3
votes1
answer492
viewsQ: Script that takes a list of integer numbers, sorts and removes duplicates
I’m taking a course in python and I’m trying to solve the following exercise: Exercise 1 - Removing repeated elements Write the remove_repeated function that takes as a parameter a list of integer…
-
-3
votes2
answers415
viewsQ: Call list in function in python 3
I am creating a script for my python course. The script takes as input a sequence of integer numbers terminated by zero and returns the numbers in ascending order, removing the repeated ones. The…
-
1
votes2
answers54
viewsQ: Doubt with Lists
When I type this command in the console, it returns me an empty list. But if I create a file and have it executed, nothing appears, what happens? How should I do? lista = [] x = 1 while x > 0: x…
-
1
votes2
answers43
viewsQ: Doubt in the logic of the script
Guys, I was wondering why the number 2 is not the first to be printed in this script, I’m not getting the logic. altura = 5 linha = 1 while linha <= altura: print ('1', end = '') coluna = 2 while…
-
2
votes2
answers196
viewsQ: Multiplication and division result with two boxes after the comma
Hello everybody all right? I’m doing an activity for my python course, it’s a script that basically calculates the area of a wall in meters and tells how many liters of paint will be used. The…
-
2
votes3
answers465
viewsQ: Test sum function
Hello everybody all right? First I want to say that it is a pleasure to be part of this community. I’m studying python on my own, I found a course per application, I’m already in the functions part…