Solução - questão 01 de classe
Solução - questão 01 de classe
Size 1 kB - File type text/python-sourceFile contents
'''
Created on 30/11/2009
@author: Gustavo
'''
class Bola:
def __init__(self, cor, circunferencia, material):
self.__cor = cor
self.__circunferencia = circunferencia
self.__material = material
def trocarCor(self,cor):
self.__cor = cor
def mostrarCor(self):
return self.__cor
bola = Bola("branca",10,"couro")
print (bola.mostrarCor())
bola.trocarCor("amarela")
print (bola.mostrarCor())
Click here to get the file