New course! Every coder should learn Generative AI!
Try a free lesson+ 5
So, if u are taking list input from users using loop, there in the loop, u can specify that u want a number bigger than 50.
0
if you're program runs such as the user inputs number then inserting it to a List, you do this pseudo:
input num
if sum(list) + num >= 50
append num to list
On the creation of list and you want it to have a value of > 50, just add random stuff tiLL it reach 50
import random
while True:
if sum(list) < 50
list.append(random.randrange(0,whatEverNumber))
else
break