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
#!/bin/sh | |
opcoes_principal() | |
{ | |
printf "######## GUP 1.0 ######## by @bartier\n\n" | |
printf "1 - Grupo\n" | |
printf "2 - Usuário\n" | |
printf "3 - Permissão de acesso\n" | |
printf "4 - Sair\n" | |
} |
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
def average_integers(filename, recursion=False): | |
integers_count = 0 | |
with open(filename.strip(), 'r') as reader: | |
lines = reader.readlines() | |
sum = 0 | |
for line in lines: | |
try: | |
sum += int(line) | |
integers_count = integers_count + 1 |