Last active
June 27, 2016 21:40
-
-
Save codeboy101/a467ce21d065d57862c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers_in_file = [] | |
with open('numbersTest.txt') as file : ## the contents of the text file are exactly as follows , without the quotations and the arrow --> " 3 5 8" | |
x = file.read() | |
for i in x : | |
numbers_in_file.append(i) | |
del numbers_in_file[1] | |
del numbers_in_file[2] | |
int_3 = int(numbers_in_file[0]) | |
int_5 = int(numbers_in_file[1]) | |
concat_double_val = str(numbers_in_file[2] + numbers_in_file[3] ) | |
ranger = int(concat_double_val) | |
for i in range(1,ranger) : | |
if i % 3 == 0 and i % 5 == 0 : | |
print("fizzbuzz") | |
elif i % 3 == 0 : | |
print("fizz") | |
elif i % 5 == 0 : | |
print("buzz") | |
else : | |
print(i) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment