121k views
2 votes
Write an example of a Counter Variable
in python code

User IvoTops
by
3.9k points

2 Answers

0 votes

Answer:

printf(ā€œ%dā€, i++);

Explanation:

User Scribblemaniac
by
4.5k points
2 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 Eduardo Crimi
by
4.2k points