Exemple #1
0
def main():
    tv1 = TV()
    tv1.turnon()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnon()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print("tv1's channel is", tv1.getChannel(), "and volumelevel is", tv1.getVolumeLevl())
    print("tv2's channel is", tv2.getChannel(), "and volumelevel is", tv2.getVolumeLevl())
Exemple #2
0
def main():
	tv1 = TV()
	tv1.turnOn()
	tv1.setChannel(30)
	tv1.setVolume(3)
	
	tv2 = TV()
	tv2.turnOn()
	tv2.channelUp()
	tv2.channelUp()
	tv2.volumeUp()
	
	print("tv1 channel: ", tv1.getChannel(), "Volume:", tv1.getVolume())
	print("tv2 channel: ", tv2.getChannel(), "Volume:", tv2.getVolume())
Exemple #3
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)
    
    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()
    
    print("tv1's channel is", tv1.getChannel(), 
        "and volume level is", tv1.getVolumeLevel())
    print("tv2's channel is", tv2.getChannel(),
        "and volume level is", tv2.getVolumeLevel())
Exemple #4
0
def main():
	# tv1 is going to be a new TV object
	tv1 = TV()
	# gonna call all these methods on our new tv1 object
	tv1.turnOn()
	tv1.setChannel(30)
	tv1.setVolume(3)

	tv2 = TV()
	tv2.turnOn()
	tv2.channelUp()
	tv2.channelUp()
	tv2.volumeUp()

	print("tv1's channel is", tv1.getChannel(), "and volume level is", tv1.getVolumeLevel())
	print("tv2's channel is", tv2.getChannel(), "and volume level is", tv2.getVolumeLevel())
Exemple #5
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print("tv1's channel is {} and volume level is {}.".format(
        tv1.getChannel(), tv1.getVolumeLevel()))
    print("tv2's channel is {} and volume level is {}.".format(
        tv2.getChannel(), tv2.getVolumeLevel()))
Exemple #6
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print("tv1의 채널은", tv1.getChannel(),
        "이고 음량 크기는", tv1.getVolumeLevel(), "입니다.")
    print("tv2의 채널은", tv2.getChannel(),
        "이고 음량 크기는", tv2.getVolumeLevel(), "입니다.")
Exemple #7
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(10)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print(
        f"tv1's channel is {tv1.getChannel()} and volume level is {tv1.getVolumeLevel()}."
    )
    print(
        f"tv2's channel is {tv2.getChannel()} and volume is {tv2.getVolumeLevel()}."
    )
Exemple #8
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)