Questions tagged as 'python'

1
answer

Python in GNU Emacs 25 and first steps

I have Ubuntu 17.10 operating system, with all its updates. I want to learn how to use Python, then paste the jump, on my own, to Ruby or Perl. I have read that, in Ubuntu, Python can be used from the console or terminal, the problem is that it...
asked by 15.02.2018 / 11:34
1
answer

Name not defined, but if I have defined it

I have this code, but when compiling it tells me that guess is not defined, when it's a couple of lines up. I've tried everything, I put the original code (it's not mine) because I do not know what I've done: from fractions import Fraction def...
asked by 08.12.2018 / 19:46
0
answers

ImportError: can not import name 'LEFT_BUTTON' from 'autopy.mouse'

import autopy as ap from autopy.mouse import LEFT_BUTTON, RIGHT_BUTTON from autopy.key import * from autopy import * import time import random %Run bleh.py    Traceback (most recent call last): File   "I: \ MEGA \ Programming \ Python \ bleh....
asked by 01.01.2019 / 22:17
1
answer

how to show a whole and a float separately? 2.83 print (2) print (83)

numero = int(input("Ingresa un numero:")) h= str("minutos") #min= numero//60 print (min) print (h) dec = round((numero*60),2) Exercise 1.4 Write a code in which you request by screen that the user enter a number (the units are seconds). Onc...
asked by 19.10.2018 / 23:12
1
answer

Error creating the model class

I have been with this error for many days and I do not know what it is. Can someone help me? I already try several things and do the migration again but it does not let me     
asked by 25.07.2018 / 00:52
1
answer

Mobile Averages in Python

I would like to know if there is a specific function in Python for calculating moving averages. In MATLAB there is one called "tsmovavg" that has an algorithm called "Financial Time Series". Will the same algorithm exist in Python?     
asked by 23.05.2018 / 16:10
1
answer

Separate elements from a sublist

I have a question about how to separate elements within a sublist, each term. For example within my list one of its elements is: A-82899, RESEARCH AND DOCUMENTATION TECHNIQUES, SOLORZANO DE NAN NAYETH., ESPOL, IBM4381,2003,8 / 22 / 2013,8, FC...
asked by 21.01.2018 / 17:38
1
answer

Delete null values ("nan") in an array

What would be the most efficient way to replace "Nan" with zeros in a large numeric data matrix in Python using Numpy?     
asked by 11.11.2017 / 15:51
4
answers

algorithm in python, list with 100 numbers without repeating and get the sum of odd and even

They ask me the following:    Perform an algorithm that generates 100 random numbers from 1 to 200.   The system must save these random numbers in a range of 100   positions, in this arrangement you should not repeat any number generated.   A...
asked by 14.10.2017 / 14:47
2
answers

I'm doing a pokedex and I have an error when running the food function, print it in binaries

import os import sys import marshal import requests import datetime from datetime import date from string import Template pokemones = [] url_api=" http://pokeapi.co/api/v2/pokemon/" class pokemon(): nombre = "" tipo = "" latitud =...
asked by 29.07.2018 / 20:27