Posts by Vinicius Barbosa de Medeiros • 331 points
9 posts
-
1
votes1
answer34
viewsQ: Segfault no fwrite. Why?
Why is this program giving segfault? struct{ int matricula; char nome[50]; }Aluno; int main(){ FILE *arq; if((fopen("alunos.txt", "w")) == NULL){ printf("Nao foi possivel abrir o arquivo.\n");…
casked Vinicius Barbosa de Medeiros 331 -
1
votes0
answers350
viewsQ: setlocale in codeblock windows without working right
I have a programming project that was to develop a replica of the naval battle game. however I did all the program on Linux(Ubuntu 16.04) however my teacher uses windows (using codeblocks) and to…
-
0
votes0
answers182
viewsQ: Bootstrap not initiating
I’m starting with Flask and I’m using Bootstrap 3.3.7, so I took the example navbar code on their website, but when I start the index Nav bar does not work: and the button looks like bootstrap 4,…
-
1
votes0
answers70
viewsQ: Run python file(by terminal) by Sublime Text 3
I currently use Atom to write my programs in Python. However, I want to migrate to sublime text for convenience and for being a lighter program. I use a plugin in Atom called: Atom-python-run. He…
-
2
votes1
answer466
viewsQ: Visual Studio utf-8 error
I tried to use Visual Studio along with the tools to Python, but when I put: print("Hello World") and grip F5 it runs smoothly. But when I put: print("olá") he gives the following error: File…
-
4
votes1
answer1821
viewsQ: Extract index for repeated elements in Python lists
In case I have a list x that contains several values, and some repeated, and I want to have the index for each element, as I can do? I tried to do using the method .index() but it only returns the…
-
5
votes1
answer8320
viewsQ: Python Hangman Game
I’m doing a Python hangman game. Every loop the program asks the letter or word: #Jogo perguntarNovamente = True game_on = True while game_on: palavra_secreta = palavra() senha_list = [l for l in…
-
4
votes2
answers13627
viewsQ: Python second degree equation
The following code calculates roots, vertices and delta of second-degree equations. The code runs clean the first time, but when I loop to restart it gives an error: Traceback (most recent call…
-
4
votes1
answer731
viewsQ: Questions in Python (Try and except)
I’m doing a program that calculates the grade of a simulated ENEM style of my school, I ask how many questions of each area the person hit, however, I want to make sure that if the person type an…