Skip to content

Instantly share code, notes, and snippets.

View marceloandriolli's full-sized avatar

Marcelo Andriolli marceloandriolli

  • Florianopolis, Brazil
View GitHub Profile
@marceloandriolli
marceloandriolli / love6.py
Created November 22, 2017 15:26
Coding Dojo - Stormtech - 22 de Novembro
# The number 6 is a truly great number. Given two int values, a and b,
# return True if either one is 6. Or if their sum or difference is 6.
# Note: the function abs(num) computes the absolute value of a number.
# love6(6, 4) → True
# love6(4, 5) → False
# love6(1, 5) → True
# love6(7,1)
def match_ends(words):
i = 0
for word in words:
if len(word) >= 2 and word[0] == word[-1]:
i += 1
return i
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic string exercises
# Fill in the code for the functions below. main() is already set up
raw = {u'pf': {u'dados': {u'protocolo': u'fd6be408-a519-41e6-8beb-55712e2b79a6', u'ccf': u'NAO', u'data_nasc': u'1985-06-01', u'situacao_receita_federal': {u'situacao': u'REGULAR', u'dataconsulta': u''}, u'nome': u'MARCELO RODRIGO DOS SANTOS ANDRIOLLI', u'enderecos': {u'endereco': [{u'tipo_logradouro': u'AV', u'complemento': u'AP 302', u'bairro': u'KOBRASOL', u'cidade': u'SAO JOSE', u'logradouro': u'LEDIO JOAO MARTINS', u'numero': 584, u'score': 8, u'cep': 88101100, u'uf': u'SC'}, {u'tipo_logradouro': u'SRV', u'bairro': u'CAMPINAS', u'cidade': u'SAO JOSE', u'logradouro': u'ELVIRA SCHMIDT GOEDERT', u'numero': 8, u'score': 8, u'cep': 88101335, u'uf': u'SC'}]}, u'signo': u'G\xcaMEOS', u'cpf': 4353350900, u'faixa_renda_estimada': u'D', u'idade': 32, u'probabilidade_obito': 0, u'telefones_moveis': {
u'telefone': [4832411640, u'', u'', 48984833639, 48996219722, u'']}, u'mae': {u'nome': u'JANETE FRANCISCA DOS SANTOS'}, u'ocupacoes': {u'ocupacao': {u'telefones': {u'telefone': [8134650705, 4821080953, 4821080954,