Questions tagged as 'python'

1
answer

How do I animate an object on the canvas with a bind with an animation already "rotating"

I was making a game copy of Space Invaders but when I went to do the "shot" of the ship, I came across a problem: AsseenintheGif,whenIhitthekey,everythingonthecanvas"freezes" until the shot reaches the end, how do I solve it? Thank you in...
asked by 01.10.2018 / 04:51
1
answer

Treat functions that return multiple values in Python [duplicate]

For example, I have a mergeSort(alist) function that has return return count, blist that is, returns an integer that is the inversion counter and a list of values. When you pass a list 5 4 3 1 2 5 and make prin...
asked by 29.09.2018 / 20:44
1
answer

Relationship between classes in Python

Imagine that you are developing a system for controlling a Vehicles. With this it is necessary to register the vehicles available in the concessionaire for sale. a) Think about the data you need and create a class to represent vehicles. b)...
asked by 30.09.2018 / 23:56
0
answers

Test error with Selenium with Python 3.x

I'm doing a test on a simple page that I created and runs with flask just for testing, I'm using Behave and Gherkin to create the cases. The error occurs when selenium has to fetch the form's field ID from a simple post inside the page's blog....
asked by 27.09.2018 / 15:00
1
answer

How to make more than one type of request to the Python server?

I've separated using a function, but the code does not get the 'date'. COMPLETE SERVER CODE: import socket import json import sys dicty = { 'the': 'o, a, os, as', 'hello': 'ola', 'hi': 'oi', 'good': 'bom', 'ugly': 'feio...
asked by 05.10.2018 / 13:18
1
answer

How to capture multiple HTML values with django forms

In order for html to send a field of type select with multiple values selected it is necessary to put the [] notation in the name attribute of html : <select name="categories[]" multiple="multiple" class="form-input__se...
asked by 26.09.2018 / 15:59
0
answers

How to draw rays in 3D matplotlib?

Is there a way to plot simply by giving only the radius and coordinates of the center? I found on the internet only filled circles and a way to plot rings with sine and cosine functions, but I do not know how to change the coordinate of the cent...
asked by 04.10.2018 / 21:34
0
answers

I want to be able to access system folders

I'm doing a ransomware for a college job (it will run on VMs) and I would like to hit a folder in the "System32" folder to "kill" the VM, but I need "power" and I do not know how to do that The course is Information Security and my goal is to...
asked by 05.10.2018 / 02:33
1
answer

Variable check if the field is not typed in Python?

I need to check if the variable was filled with a name, I tried to check with If and with break however the field keeps filling without typing a word .... Below is the code I'm doing ... opcao = 0 while opcao != 6: print("""3[32m Em relaçã...
asked by 04.10.2018 / 21:00
2
answers

Use {% for%} and {% if%} in Django template

I have 3 videos saved in the Postgres database where I set a star_date and the video only appears in the template when start_date <= date.today() My problem is in template . I have 3 buttons, one for each video, my idea is...
asked by 02.10.2018 / 19:22