68,305 views
1 vote
1 vote
Write an example of a Counter Variable
in python code

User Ruddy
by
2.5k points

2 Answers

12 votes
12 votes

Answer:

printf(“%d”, i++);

Explanation:

User Blu Towers
by
2.9k points
12 votes
12 votes

Answer:

count += 1

OR

count = count + 1

Explanation:

count = 0

numbers = int(input("Enter a number: "))

while number > 0:

number = number // 10

count +=1

print("Total number of digits", count)

User Joshua McKinnon
by
3.0k points