Posts by Joao Peixoto Fernandes • 111 points
14 posts
-
0
votes1
answer479
viewsQ: Parking class in Python
I’m learning to code in Python. Right now I need to implement a class that has the following features: A class called parking, which simulates the operation of a car park. -The class receives an…
-
0
votes1
answer152
viewsQ: Python - Type function in tuples
Hello, I’m trying to make a program in Python, which gets a positive integer number. That program shall verify that it is whole (with the type function) and if it is positive. Should return a…
-
1
votes3
answers502
viewsA: Python - Cycle for as an alternative to the while cycle
Well, I figured it out! Here is the code: print('/'*30) print('Ciclo FOR') print('/'*30) soma = 0 i = 20 for i in range(20, 0, -2): soma += -i print ('Soma =', soma)…
-
2
votes3
answers502
viewsQ: Python - Cycle for as an alternative to the while cycle
General considerations: I am currently programming in python; I have a relatively simple level code; The code contains an instruction cycle of the type while loop; I would like to know if there is a…
-
0
votes1
answer115
viewsQ: python - Print, by line, the letter and nickname append()
Based on the following list:: escritores = [['Pedro', 'Tamen'], ['Almeida', 'Garrett'], ['Camilo', 'Pessanha'], ['Almada', 'Negreiros'], ['Ibn', 'Bassam'], ['Antonio', 'Aleixo'], ['Ricardo',…
-
1
votes1
answer46
viewsQ: Python - Complete list of each writer, along with the acronym of each person (first letter of name and surname)
Based on the list of writers described below, I have to manually create a list in which each element is a list of two elements, name and nickname. Here is the list: escritores = [['Pedro', 'Tamen'],…
-
1
votes1
answer5282
viewsQ: Python - Sort string order by order of increasing number of letters
Having the following list: lista_nomes =['Manuel', 'Laura', 'Antonio', 'Jasmim', 'Maria', 'Silvia', 'Lu', 'Pancrácio', 'Diogo', 'Ricardo', 'Miguel', 'Andre'] And wanting to order it by order…
-
0
votes1
answer402
viewsQ: Python - print list elements that have 5 letters
Boas, Having the following list:: lista_nomes =['Manuel', 'Laura', 'Antonio', 'Jasmim', 'Maria','Silvia', 'Lu', 'Pancrácio', 'Diogo', 'Ricardo', 'Miguel', 'Andre',] I want to print the list elements…
-
-1
votes1
answer294
viewsQ: python - Print the list elements ending with the letter 'a'
Considering the following list: lista_nomes =['Manuel', 'Laura', 'Antonio', 'Jasmim', 'Maria', 'Silvia', 'Lu', 'Pancrácio', 'Diogo', 'Ricardo', 'Miguel', 'Andre',]* What I want is to print out the…
-
2
votes2
answers377
viewsQ: List separated by "-"
The theme is as follows: I have a list[1,5,3,6,22,45,63,30,344,22,12,25,10] And I wanted to print the elements of that list in one line and separated by "-". I’ve tried that way…
-
1
votes3
answers2068
viewsQ: PYTHON- Program that prints on screen all numbers divisible by 7 but not multiples of 5, between 3000 and 3200 (inclusive)
Hello, I’m doing the following program: The programme shall print on the screen all numbers which are divisible by 7 but are not multiples of 5 between 3000 and 3200 (inclusive). Turns out I’ve done…
python-3.xasked Joao Peixoto Fernandes 111 -
0
votes3
answers781
viewsA: Python Help: Exercise School Year
Thank you in advance to all those who helped me. Here I leave the code: Code Code: import datetime print('='*24) print('Exercício 3: ano escolar') print('='*24) nome = input ("Como se chama? ") ano…
pythonanswered Joao Peixoto Fernandes 111 -
0
votes3
answers781
viewsQ: Python Help: Exercise School Year
Hello, I am in need of help for an exercise in Python which is as follows: Exercise School year • Write a program that asks for the name and date (year, month and day) of birth of a person. • The…
pythonasked Joao Peixoto Fernandes 111 -
0
votes1
answer6588
viewsQ: program asking for the name and date (year, month and day) of a person’s birth in Python
Hello, I am having difficulties in the following code in Python:. The idea is to create a program that asks for the name and date (year, month and day) of birth of a person. The program must also…
pythonasked Joao Peixoto Fernandes 111