Posts by Kenneth Anderson • 313 points
18 posts
-
0
votes0
answers9
viewsQ: Initial step when creating a navigation in Android Studio
It’s very basic, but I’m not able to implement it. I’m wanting to start studying navigation, but not being able to implement it correctly. On the android site they ask me to put this code in the…
-
0
votes1
answer64
viewsQ: Save MP3 to a specific directory using youtube_dl
Hello! As said in the title, I’m wanting save the audio I’ll download to a specific folder from my desktop using youtube_dl, but I haven’t found a clear alternative. The directory I will use in the…
pythonasked Kenneth Anderson 313 -
-1
votes2
answers3282
viewsQ: Read . txt files and put them in an Arraylist
How to read the file . txt below and turn it into an Arraylist? Alicate;6;3.4 Martelo;10;4.5 The Arraylist at the end would look like this: [[Pliers, 6, 3.4],[Hammer,10;4.5],...] try{ FileReader fr…
javaasked Kenneth Anderson 313 -
0
votes1
answer141
viewsQ: How to get Printwriter to write in the file . txt determined String of a variable?
My idea is to create a small database . txt to save a user’s data. public void menuContato(){ try{ FileWriter fw = new FileWriter("usuarios.txt"); PrintWriter pw = new PrintWriter(fw);…
javaasked Kenneth Anderson 313 -
3
votes1
answer2210
viewsQ: How to make my code read in UTF-8 in C?
When I spin that code: #include <stdio.h> int main(void) { int teste[10]; printf("Imprimindo o vetor 'teste': %d\n", teste); printf("O endereço do primeiro elemento é: %d\n", teste[0]); return…
casked Kenneth Anderson 313 -
1
votes2
answers333
viewsQ: Single variable declaration for scanf
I already know how to declare a variable in the traditional way using the scanf(), but I’m thinking of a way that I can use fewer lines and make the code more organized (that’s what I tried with the…
-
0
votes1
answer1701
viewsQ: Delete certain lines from a python . csv
What would be the easiest way to delete only certain lines from file . csv within several other? No . csv below I would like just the lines of the Client (C) Cleiton and its films (F) that in the…
-
0
votes2
answers2587
viewsQ: Delete a particular line from a . csv using Python
What I would like to do is that when the user typed the name of a person who was inside the file. csv, his line and the lines of movies he evaluated were erased (I used an identifier for this), the…
-
0
votes1
answer250
viewsQ: How to print a given list from a string of a . csv using python
The first part that is to detect the position of the list I have already managed, the problem is at the time of Else, would like to know a method by which the Else is not printed together with the…
-
1
votes1
answer9332
viewsQ: Line break in a file . txt
How to break the line by passing my data to a file. txt? The code I’m using to open, write and close . txt are these: arquivo = open("arquivo.txt", "a", newline="") arquivo.write("%s;" %…
-
1
votes3
answers966
viewsQ: How to store an int and a complete string from within an input?
I wish that at the time of typing in the variable N the word "2 orange juice" the file stores in the variables number and food: number = 2 (preferably integer, but anything I convert it after) food…
-
4
votes3
answers1815
viewsQ: How to start a range from 1
I wish on the part of input("Put student’s note " + str(notes) + ":" ) the computer ask "Enter student’s grade 1: " and not starting from 0, how to do this with the range function? Code below.…
-
1
votes1
answer693
viewsQ: How to allow only a range of numbers?
I’m making a student grade number registration code, so I want the user to put a number between a range of 1 to 10, BUT I also want the breaks to be in float(ou seja: 0.1,0.2... 9.8,9.9,10.0).…
-
1
votes1
answer1559
viewsQ: How to print a. txt file in Python
I try to print that part of my work into a file. txt (code below), but I can’t, because at the time of giving Run in the file that whole part comes out blank: It is worth mentioning that even…
-
1
votes1
answer449
viewsQ: How to select and print a value within a list created by a "def"
The title is already self explanatory, as I do to select and choose given str or int float/ inside a list that was created by my record function def registro(cadastroaluno): matricula =…
-
0
votes2
answers941
viewsQ: How to turn a String list into a Float list?
If I run this code, it will give a string list: So that I can not make the average number correctly (since it is in string). What can I do to have the number printed in float/int? Does this "bug"…
-
1
votes1
answer957
viewsQ: How exactly do you divide two variables?
In the code below I try to divide the values, but I end up getting a completely wrong answer from the calculation: nota1 = input ("Digite a nota 1: ") nota12 = input ("Digite a nota 1: ") nota2 =…
-
1
votes1
answer119
viewsQ: How can we allow just one particular word?
How to make only the name "Maria" allowed by the program? I want any other word I put (e.g., John) the user can not proceed with the completion of the Form. nome = input("Coloque seu nome: ") cpf =…
pythonasked Kenneth Anderson 313