Go to advanced search

by porpo
Tue Oct 08, 2019 12:31 pm
Forum: Python
Topic: What will happen if the user choose the same colour for both the message and the background.
Replies: 1
Views: 314

What will happen if the user choose the same colour for both the message and the background.

from sense_hat import SenseHat from time import sleep from random import randint sense = SenseHat() r = (255,0,0) b = (0 ,0, 255) g = (0, 255, 0) while True: red = int(input("Please enter the value of the red color for message")) if 0 < red < 255: print("That is a correct value") r = (red,0,0) elif...
by porpo
Sun Oct 06, 2019 12:52 pm
Forum: Astro Pi
Topic: def function get_color does not show_msg
Replies: 1
Views: 2271

def function get_color does not show_msg

from sense_hat import SenseHat from time import sleep sense = SenseHat() sense.set_rotation(180) red = (255, 0, 0) def get_color(color): keep_looping = True no_of_try=1 while keep_looping: #color_str=input("Enter the value of the" + color + \ "color for message (0 to 255):") while no_of_try < 4: co...

Go to advanced search