Homework 2
homework for the second class lesson
binary1 = 0
binary2 = 0
binary3 = 0
binary4 = 0
binary5 = 0
binary6 = 0
binary7 = 0
binary8 = 0
i = 0
user = input("what number do you want? Limit is 255")
while i < int(user):
if binary1 == 0: binary1 += 1
else:
binary1 = 0
if binary2 == 0: binary2 += 1
else:
binary2 = 0
if binary3 == 0: binary3 += 1
else:
binary3 = 0
if binary4 == 0: binary4 += 1
else:
binary4 = 0
if binary5 == 0: binary5 += 1
else:
binary5 = 0
if binary6 == 0: binary6 += 1
else:
binary6 = 0
if binary7 == 0: binary7 += 1
else:
binary7 = 0
if binary8 == 0: binary8 += 1
i += 1
print(user)
print(str(binary8) + str(binary7) + str(binary6) + str(binary5) + str(binary4) + str(binary3) + str(binary2) + str(binary1))
names = ["jaden","max","dylan","orlando"]
for n in names:
print(n)
print(len(n))