Questions tagged as 'python'

3
answers

Check if value is string or number [duplicate]

10) Make an algorithm that checks if a given value is a String. valor = str(input("Informe um valor: ")) if(type(valor) == str): print("É uma String!") In the IDLE or Python Console of PyCharm, if I type: valor = "João" type(valo...
asked by 08.11.2018 / 16:36
1
answer

Can anyone tell me where the error is, please? You are giving "invalid syntax"

n = str(input("Informe o nome do aluno: ") m = int(input("Informe o numero da matricula do aluno: ") print("O nome do aluno é: %s, o numero da matricula é: %d" %(n,m))     
asked by 22.08.2016 / 21:57
2
answers

Accept only numeric input

nota = -1 while nota < 0 or nota > 10: nota = int(input("Informe a nota entre 0 e 10: ")) if nota < 0 or nota > 10: print("Valor inválido") I need to include in this validation code for, if the user types string (a,...
asked by 09.10.2017 / 21:28
1
answer

Reset timer value in python [closed]

import time start=time.time() fim=time.time() How do I reset the team? I want it to go back to zero and start a new count without the program ending. Do this 3 times.     
asked by 02.01.2019 / 17:39
1
answer

Take data from a page and move to the database

I want to make sweepstakes via WhatsApp. To participate, the person would send a message with the name to the number that I will announce and it will receive the confirmation response and the token number. I wanted the bot to take the phone n...
asked by 09.11.2018 / 15:45
2
answers

Creating a program in Python

Hello, I'm not very good at programming, and I'm having a hard time at this exercise, I've already tried it and I can not solve it ... I would like someone to help me redo this code. Since I thank you, who can help me Create a program that re...
asked by 24.10.2018 / 03:57
1
answer

Problem click button python selenium

I'm having trouble clicking a button, so try gives the ElementNotVisibleException error: Message: element not interactable pdf = driver.find_element_by_xpath('//*[@class="btn btn-default btn-segunda-via-aberta ng-scope"]') pdf.click()...
asked by 17.10.2018 / 20:37
1
answer

How to retrieve text from a tkinter widget, created with the GUI PAGE generator?

I'm trying to create an interface where the user can type text and save that text in a txt document. To make the process easier, I used a GUI generator called PAGE, which uses the package TKinter, which already comes with Python. The code genera...
asked by 11.10.2018 / 14:14
2
answers

User dashboards logged in using django admin user

Good Morning I'm using Django's default user model, and I would like to have a user dashboard logged in, to check who's using the system, can you tell me if django has this information? I checked that they have a table of sessions but everyth...
asked by 28.09.2018 / 13:25
1
answer

Python Replay Structure [closed]

I need to solve the following equation in Python    N is an integer and positive value. Calculate and show the value of E according to the following formula:       E = 1 + 1/1! + 1/2! + 1/3! + ... + 1 / N! My attempt: n = int(input("Di...
asked by 13.09.2017 / 17:00