Binary Counter?

This is the place for queries that don't fit in any of the other categories.

Binary Counter?

Postby godbrandont » Thu Oct 03, 2013 3:50 pm

I'm looking to make a counter in python that automatically counts up in binary numbers eg: 0, 10, 11, 100, 101, 110, 111, 1000, 1001 etc Automatically when you run the program but i'm not quite sure how i would go about doing it, thanks (Sorry i'm not that advanced at python, i am still doing my GCSE's and i'm trying to learn as much python as i can)
Last edited by Yoriz on Thu Oct 03, 2013 5:21 pm, edited 1 time in total.
Reason: First post lock
Posts: 1
Joined: Thu Oct 03, 2013 3:48 pm

Re: Binary Counter?

Postby Yoriz » Thu Oct 03, 2013 5:22 pm

Hi, welcome to the forum.
Please ensure you read the 'new users read this' link in my signature.

What have you tried so far and what problems did you encounter with your code?.
Due to the reasons discussed here we will be moving to on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: Binary Counter?

Postby Marbelous » Fri Oct 04, 2013 2:44 pm

Do keep in mind that ALL numbers in your computer are already in binary. They just get converted to a human readable form by python's print methods.

HINT: the bin() function will print binary representations.
User avatar
Posts: 401
Joined: Fri May 31, 2013 8:12 pm

Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 12 guests