Please show me where I am going wrong


#1


https://www.codecademy.com/en/courses/python-intermediate-en-KE1UJ/0/3?curriculum_id=4f89dab3d788890003000096#

Oops, try again.
Make sure to write the answer in binary using the "0bxxx" format.


one = 0b001
two = 0b010
three = 0b011
four  = 0b100
five = 0b101
six  = 0b110
seven = 0b111
eight = 0b001 + 0b111
nine  = 0b010 + 0b111
ten   =  0b011 + 0b111
eleven = 0b100 + 0b111
twelve = 0b101 + 0b111


#2

I believe you need quotes around them. :slightly_smiling:


#3

@rohitamalan,
Maybe you would understand....
https://discuss.codecademy.com/t/3-14-plz-print-code-so-i-can-compare/10465/2?u=leonhard.wettengmx.n


#4

Put quotes about the numbers ; didn't go well.


#5

I tried it ; but codeacademy is specific over '0bxxx' format.


#6

@rohitamalan,
What did you try....??


#7

This is working ! Thanks @leonhard.wettengmx.n !

one = 0b1
two = 0b10
three = 0b11
four = 0b100
five = 0b101
six = 0b110
seven = 0b111
eight = 0b1000
nine = 0b1001
ten = 0b1010
eleven = 0b1011
twelve = 0b1100


#8

@rohitamalan,

nice to know

You could test in labs.codecademy.com
choose Python
You will get a split-screen
In the left-hand-side you paste-in your code
click on the Run button.
The right-hand-side is the console

== guidance ==
https://docs.python.org/2/reference/
http://legacy.python.org/dev/peps/pep-0008/
http://docs.python.org/2/reference/expressions.html
http://docs.python.org/2/library/functions.html
https://docs.python.org/2/tutorial/datastructures.html#tuples-and-sequences
http://stackoverflow.com/questions/101268/hidden-features-of-python?rq=1


https://en.wikipedia.org/wiki/Python_%28programming_language%29