Quotes help make search much faster. Example: "Practice Makes Perfect"

Sunday, December 2, 2012

Codecademy: Slide to the Left! ...


#sample solution


shift_right = 0b1100
shift_left = 0b1

# Your code here!
shift_right = shift_right >> 2
shift_left = shift_left << 2
print bin(shift_right) #3
print bin(shift_left) #4

#check
print int(bin(shift_right), 2)
print int(bin(shift_left), 2)

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts