Questions tagged as 'python-3.x'

1
answer

URI Online Judge - 2163 - Python 3

I am having trouble solving the problem The Awakening of the Force of the URI.    Long ago, in a galaxy far, far away ...       Following the decline of the Empire, scrap yards are scattered all over the   universe searching for a saber...
asked by 02.04.2018 / 06:10
1
answer

I'm wanting my def to print (): ... get my def plus_alto (): and my def plus_through (): and print the results

lista_aluno = [] lista_tamanho =[] def nome_altura(): for i in range(0,10): aluno = str(input('Digite o nome do aluno:\n')) lista_aluno.append(aluno) tamanho = int(input('Digite a altura:\n')) lista_t...
asked by 30.03.2018 / 18:55
0
answers

How to return the largest element of a vector recursively?

I would like to know how to find the highest value of a vector recursively, in iterative form I got it good.     
asked by 07.04.2018 / 19:18
2
answers

Request url wikipedia by date

Hello, a great friend made me this code, I'm very new to python: ' from bs4 import BeautifulSoup import requests url = "https://dumps.wikimedia.org/other/pageviews/2018/2018-04/" page_html = requests.get(url).content soup = BeautifulSoup(pag...
asked by 09.04.2018 / 13:20
1
answer

How do I solve this code in kivy python

I'm trying to schedule a calendar using python and the kivy module, but I'm having a problem that I do not understand how I can solve:  This is the calendar.py file: from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy....
asked by 06.04.2018 / 16:01
1
answer

How to print an element from a list of lists in python

I have a list of lists, like this: [('name1', size1), ('name2', size2)] I want to just print the name of each list, how could I do that?     
asked by 31.03.2018 / 15:20
1
answer

Python: Serialization of namedtuple classes in json

import json from collection import namedtuple class Employee: def __init__(self, name, age): self.name = name self.age = age def tojson(self): return json.dumps(self.__dict__) Hello everyone, I've developed t...
asked by 08.04.2018 / 22:55
1
answer

Information about an API in your web application - Flask Python

I'm a beginner in python and I'm venturing into flask because I found learning better than Django. So I apologize for my ignorance of what I'm going to ask, or if my code is wrong, how do I get information from a website API and play a table in...
asked by 09.04.2018 / 03:25
1
answer

How do I check if there is a repeated string in a list?

I would like to learn an easier way to check all items in a list and look for repeated strings. I'm currently doing this: elif "azul" in fios[0] and fios[1] or "azul" in fios[1] and fios[2] or "azul" in fios[0] and fios[2]: print("Corte...
asked by 02.04.2018 / 21:54
2
answers

I want to show numbers in a row. Python 3.6

I want to show the data output as a queue, for how many times the user wants it. def ex1(): valo = int (input("Insira o numero")) for t in range (1,valo+1): print((int(valo))*1) print (ex1()) Ex: times = 4 Saida: 4 44 444...
asked by 27.03.2018 / 16:38