Questions tagged as 'contador'

4
answers

Program to count the vowels of a chain

   "Perform a call_count_name () function that receives as an argument any string and returns the number of vowels present in the string." def contar_vocales(x): voc=0 for i in len(cad): if cad[i]=='a' or cad[i]=='e'or cad[i]=...
asked by 04.11.2017 / 20:53
1
answer

Count line breaks in a file.txt with Python

I am doing a lexical analyzer for a class and one of the things that it must accomplish is to count the line breaks. How can I count the line breaks in Python from a text file? This is my code, am I using regular expressions? **def newLine(lin...
asked by 12.12.2018 / 08:41
1
answer

problem with an error counter list index out of range in python

hi I'm trying to make a for to iterate a list called coding the size (l) the problem is that I get the following error and I tried to solve it with the use of while but nothing: / follow the error, I understand that it is by the size of the list...
asked by 30.06.2018 / 21:55
1
answer

Date updated on Tkinter

I want to do an accountant in Tkinter little by little. At the moment I want you to show me the date in seconds (yes, I know it's a bit weird ...) through this function: def Date_secondsnow(): now = datetime.now() Datesecondsnow = now....
asked by 26.08.2017 / 09:52
1
answer

Life time of an object [closed]

I need to do a program with java that creates an object every 30 seconds and puts it in a queue and then does some operations with them. I had thought about creating the object and that creating it would also create a kind of counter, so that wh...
asked by 23.10.2018 / 16:36
1
answer

How could autogenerate chain type code?

I have the doubt on how to generate auto-generate chain codes with a counter that is: e001 e002 e003 e004 ... the following code is generating e000 e000 e000 e000 If someone could help me, it would be great, thanks public cla...
asked by 18.08.2018 / 05:12
0
answers

How to avoid the loss of information of an activity when I go to another activity or I put the back button?

Good afternoon friends. I have the following problem, I am making a simple application in which it is basically a counter, I have a textview and 2 buttons, one to add and another to subtract the value that is in textview but it hap...
asked by 26.01.2018 / 22:36
1
answer

how to do a random array counter in C

good, the program consists of making a series of rolls N of a dice and counting the number of times a number ordered by screen. This is the code I have made but something is wrong with the counter :( Thanks in advance. #include <stdio.h>...
asked by 06.11.2017 / 19:57
1
answer

Keep counter in python

Good day. I am doing a simple program that takes me the sum of each iteration of vehicles, and in the end it shows me the total amount of them. The code I made is the following: from random import random nAutos=0 for i in range(3): aleator...
asked by 03.10.2018 / 18:14
1
answer

How to read word by word from an Array? [duplicate]

What I'm looking to do is a counter that adds the value of each word in its ASCI code. For example: Hello (H = 45, or = 56, l = -45, a = 23. Total Value = 79). This is the code of my Accountant: public class Accountant { public static f...
asked by 14.12.2018 / 16:47