Skip to content

Tag: python

Creating a class property using a function

I found this fantasy name generator here. I am trying to adapt the code to suit my purpose. I want to create an NPC name automatically, using the function name_gen within the class NPC. With the NPC characteristics being: The code from the name generator I need is the following: Now the only thing I think I s…

How to get the list of students with second lowest grade?

I am trying to solve a problem in coding websites. I came up with below problem. Problem: Given the names and grades for each student in a class of students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Note: If there are multiple students with the second…

Clear reactions in setting time [nextcord.py]

I want clear or disable reactions in setting time using nextcord.py I making poll command and wanna delete or disable(I dont know can I or not) reactions in setting time I have code like this I have my time time_plus and wanna do something when time invoke Answer You can use reaction.clear or reaction.remove …