Questions tagged as 'python'

2
answers

How to transform a list into set in Python?

I'm trying to intersect the player list with the computer list, but I'm getting an error that goes like this: "line 13, in print (set (player) .intersection (computer)) TypeError: 'int' object is not iterable ". Would anyone know where I'm go...
asked by 25.05.2018 / 02:52
1
answer

How to perform calculations on top of a CSV file with Python 2.7?

I'm learning some commands for parsing data extracted from a CSV file and trapping in the following situation: I want to use this CSV as the basis for averaging the room: Nome;P1;P2;P3 Maria;8;7;10 Julia;9.5;10;7 Ailton;7;8;10 Leo;4;5;3...
asked by 13.07.2018 / 19:47
1
answer

switching from one entry to the other when entering a word

People, help me with this, I have two entry and I need when I type a word for example (Python) it changes from one entry to the other automatically from tkinter import * janela2.geometry('250x250+100+100') lb2 = Label(janela2, text='coloque...
asked by 17.06.2018 / 15:56
1
answer

Search for a sub-string in the first column of a csv file

I'm starting to learn in python and I do not know how to proceed with this code. I need to check the first column of a csv file, and if it does NOT have a date in a cell of that column, insert the one that was passed as a parameter. import...
asked by 20.06.2018 / 19:37
2
answers

block Try and except

I need to run this program: Rewrite your payment program using try and except for the program to handle non-numeric inputs amicably by printing a message and exiting the program. The following shows two program implementations: Digite as Ho...
asked by 20.06.2018 / 11:04
1
answer

How to install packages in pip without internet access?

I'm having trouble with python. I'm rendering service for a bank, but the network is very closed, I can not download the files via pip . I can download the packages in a different way but I can not get them to run, can someone help me?...
asked by 20.07.2018 / 06:15
2
answers

How can the end of "for" be a user-defined variable?

In a for in C, we define "start, end and increment step. " I know Python is not like this. I saw it called foreach . I wish the end of my for to be defined by the user. And that, at each iteration until the end of for, a value was requested...
asked by 12.05.2018 / 11:39
1
answer

Error in phyton script

I downloaded a script (I do not know if that's how it is said, I'm starting to program exactly today) of a game made in python but I can not execute it because there is an error    File "C: \ Users \ mah14 \ Desktop \ Bliblico.py", line 23   ...
asked by 29.05.2018 / 22:32
1
answer

Python: saving screenshot in loop

Why does the code below save the file one above the other? I want each screenshot to generate a separate file within the specified folder. import datetime import pyautogui import time #armazena o nome do arquivo no formato dinâmico de an...
asked by 09.05.2018 / 03:29
1
answer

How can I create a dynamic database in pyhton [closed]

Can anyone help me with how to create a dynamic database, where can I add and remove items? In the Python language, if possible with Sqlite     
asked by 10.05.2018 / 22:01