•1 year ago
shared a Post
Hey there, I'm new to coding and am struggling quite a lot. The program wants a (480, 400) rectangle that is randomly colored. Could you help me out?
SamDev7 Python's random libary should help with that. Here's an example. import random fruits = ['apple','banana','orange','grape'] lunch = random.choice(fruits) print("I will get " + lunch + " for lunch.") Everytime you run the code, it will pick a random thing from the list and print it.1 year ago