#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 25 12:07:10 2018

@author: brant
"""
#%%
## FizzBuzz
for x in range (1, 100):
    if (((x % 3) == 0) and ((x % 5) != 0)):
        print("Fizz")
    elif (((x % 3) != 0) and ((x % 5) == 0)):
        print("Buzz")
    elif (((x % 3) == 0) and ((x % 5) == 0)):
        print("FizzBuzz")
    else:
        print(x) 
        
#%%
## Roman Numerals
target = 999
mCount = 0
dCount = 0
cCount = 0
lCount = 0
xCount = 0
vCount = 0
iCount = 0
cmCount = 0
cdCount = 0
xcCount = 0
xlCount = 0
ixCount = 0
ivCount = 0
string = ""


if (target >= 1000):
    mCount = (target // 1000)
    target %= 1000
    for x in range (0, mCount):
        string += "M"
    
if (target >= 900):
    cmCount = (target // 900)
    target %= 900
    for x in range (0, cmCount):
        string += "CM"
    
if (target >= 500):
    dCount = (target // 500)
    target %= 500
    for x in range (0, dCount):
       string += "D"
    
if (target >= 400):
    cdCount = (target // 400)
    target %= 400
    for x in range (0, cdCount):
        string += "CD"
    
if (target >= 100):
    cCount = (target // 100)
    target %= 100
    for x in range (0, cCount):
        string += "C"
    
if (target >= 90):
    xcCount = (target // 90)
    target %= 90
    for x in range (0, xcCount):
        string += "XC"
    
if (target >= 50):
    lCount = (target // 50)
    target %= 50
    for x in range (0, lCount):
        string += "L"
        
if (target >= 40):
    xlCount = (target // 40)
    target %= 40
    for x in range (0, xlCount):
       string += "XL"
        
    
if (target >= 10):
    xCount = (target // 10)
    target %= 10
    for x in range (0, xCount):
        string += "X"
    
    
if (target >= 9):
    ixCount = (target // 9)
    target %= 9
    for x in range (0, ixCount):
        string += "IX"
    
if (target >= 5):
    vCount = (target // 5)
    target %= 5
    for x in range (0, vCount):
        string += "V"
    
if (target >= 4):
    ivCount = (target // 4)
    target %= 4
    for x in range (0, ivCount):
        string += "IV"
    
if (target >= 1):
    iCount = (target // 1)
    target %= 1
    for x in range (0, iCount):
        string += "I"
    
print(string)


#%% 
## ROT13
message = "hello world"
array = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " "]
string = ""

for x in message:
    if (x == " "):
        string += " "
    else:
        index = array.index(x) + 13
        index %= 26
        string += (array[index])
        
print(string)
        
        
    
