<jupyter_start><jupyter_text>Lab 5: Iteration Student: <NAME> Group: Turno 2 Date: 2/10/2020  1) Lab 4.2. Body mass calculator<jupyter_code>while True:
    weight = float(input('Cuanto pesas(kg)? '))
    height = float(input('Cuanto mides(m)? '))
    if weight and height > 0:
        break
    else:
        print('La masa o la altura es negativa por favor vuelve a intentarlo.')
        continue
print('Tiene un Indice de masa corporal de',weight/height**2)<jupyter_output>Cuanto pesas(kg)? 67
Cuanto mides(m)? 1.87
Tiene un Indice de masa corporal de 19.159827275586945<jupyter_text>2) Lab 4.3. User registration<jupyter_code>login_name = input('Write your login name:\t')
while len(login_name)!=8:
    login_name = input('Write your login name:\t')
    continue<jupyter_output>Write your login name:	Juan
Write your login name:	Juan123
Write your login name:	Fernando<jupyter_text>3) Lab 4.4. Multiplication table<jupyter_code>for i in range(11):
    print("{0:4}".format(i),end='')
print('\n')
for x in range (1,11):
    print('{0:4}'.format(x), end='')
    for y in range (1,11):
        print("{0:4}".format(x*y), end='')
        if y == 10:
            print('\n')<jupyter_output>0   1   2   3   4   5   6   7   8   9  10

   1   1   2   3   4   5   6   7   8   9  10

   2   2   4   6   8  10  12  14  16  18  20

   3   3   6   9  12  15  18  21  24  27  30

   4   4   8  12  16  20  24  28  32  36  40

   5   5  10  15  20  25  30  35  40  45  50

   6   6  12  18  24  30  36  42  48  54  60

   7   7  14  21  28  35  42  49  56  63  70

   8   8  16  24  32  40  48  56  64  72  80

   9   9  18  27  36  45  54  63  72  81  90

  10  10  20  30  40  50  60  70  80  90 100<jupyter_text>4) Lab 4.5.1 ATM Simulator<jupyter_code>customer = int(input('How many customers do you have?\t'))
database = {}
x = 0
while x < customer:
    ID = int(input('Introduce your ID:\t'))
    Savings= int(input('Introduce your savings:\t'))
    database[ID]=Savings
    x +=1
ID_user= int(input('Introduce yout customer ID:'))
while database.get(ID_user)==None:
    print(f'Error, ID {ID_user} is not in our database\n')
    ID_user= int(input('Introduce yout customer ID:'))
    continue
print(f'Customer ID: {ID_user} Savings: {database[ID_user]}\nOptions:\n -Op 1: Withdraw money\n -Op 2: Deposit money\n -Op 3: Exit')<jupyter_output>Introduce yout customer ID:6
Error, ID 6 is not in our database

Introduce yout customer ID:7
Error, ID 7 is not in our database

Introduce yout customer ID:1
Customer ID: 1 Savings: 100
Options:
 -Op 1: Withdraw money
 -Op 2: Deposit money
 -Op 3: Exit<jupyter_text>5) Lab 4.6. Draw a Tic Tac Toe board<jupyter_code>def print_horiz_line(board_size):
    print('{0:5}'.format(" --- ") * board_size)
def print_vet_line(board_size):
    print("{0:5}".format('|') *(board_size+1))
x=0
while x < 3:
    print_horiz_line(3)
    print_vet_line(3)
    x+= 1
print_horiz_line(3)<jupyter_output>---  ---  --- 
|    |    |    |    
 ---  ---  --- 
|    |    |    |    
 ---  ---  --- 
|    |    |    |    
 ---  ---  ---<jupyter_text>6) Lab 4.7. Place tokens in Tic Tac Toe<jupyter_code>game = [["X", "O", ""], ["O", "X", ""], ["O", "X", "X"]]
x=0
while x<len(game):
    print('\n----')
    for i in game[x]:
        print(i,end='|')
    x+=1
def game_table(board):
    game = [["X", "O", " "], ["O", "X", " "], ["O", "X", "X"]]
    x=0
    while x<len(game):
        print('{0:4}'.format('\n------'))
        for i in game[x]:
            if i == ' ':
                continue
            else:
                print('{0}'.format(i),end='|')
        x+=1
game_table(3)<jupyter_output>------
X|O|
------
O|X|
------
O|X|X|
{'fraction_non_alphanumeric': 0.15793803125856867, 'fraction_numerical': 0.08472717301891966, 'mean_word_length': 2.380908248378128, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '291536', 'license': 'MIT', 'n_tokens_mistral': 1630, 'n_tokens_neox': 1469, 'n_words': 426, 'path': 'LABS/Lab4.ipynb', 'repo_name': 'juanvecino/Python_LAB', 'size': '3652'}