Character Customization In Python?? #python #programming #coding

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Well, for your first choice you have 10 options, 9 for the second and 8 for the third. That makes 720. Since the order does not matter and there are 6 ways to arrance three things, we end up at 120. For those people who prefer actual explanations than copying code.

Chronologist
Автор

A very swift Google gave the equation:
C(n, r) = (n!) / [(r!) x (n - r)!]

Dokattak
Автор

Better idea: Don't skip math class

Feuergraf
Автор

And combination from itertools package gives you every combination if you need those.

Migoyan
Автор

Here’s how I thought of it, there’s ten elements, and for the first random option there are 10 choices, then for the next 9, then 8. This makes it 10x9x8, however, with any 3 traits there are six ways to list them, which are really all identical, so (10x9x8)/6 which is 120

shaidan
Автор

Please do a video on this idea similar to this. Can you show me how you would create something similar to this? the number of skills you can pick is based on your level. For example. level 1 allows 3 skills. lvl 2 is 2 skills, level 3 is 1 skill, level 4 is 2 skills. etc.

jessefry
Автор

and you can always use itertools.combinations() as well

extraordinaaron
Автор

from itertools import combinations
print(sum(1 for _ in combinations(skills)

MisterAssasine
Автор

I agree with some of these comments, but there’s usually no need to reinvent the wheel if it’s a native package. Now if you had to import an external dependency then I’d probably suggest making your own function.

Torbikini
Автор

I was wondering, can you also do permutations?

Mediocre_productions
Автор

Combinations of k out out of n objects:
n! / (k!*(n-k)!)
If you want to be a software engineer learn math. Otherwise just code.

manosmakris
Автор

It's just like calculating combination in math

victorndubuisi
Автор

I would pick healing, mobility, persuasion

edmundprescott
Автор

This is quite useful. And you post almost daily, keep it up man

juansnyders
Автор

Now, how would you automatically create those 120 lists?

play_sports_and_read_books
Автор

Wow! YouTube algorithm is getting spookily good, man!!!




I was looking for "Idiocracy" and started watching shorts with some funny scenes, then I swiped down and it showed me another scene. And then another, and another until I got this clip right here.

At first I was confused, but then I realized THIS is EXACTLY how we end up in distopian future!

Teaching someone to use a library to calculate something simple just makes people dumb and dependent. All this needs now are electrolytes!

ScorpioHR
Автор

math.comb(len(skills), 3) would be better no?

MegaKUBZI
Автор

10 choose 3. The function almost certainly just uses the formula n!/(n-k)!k! For inputs n, k

ARKGAMING
Автор

Thank u bro. Happy I found your channel 🙏🏾

dezdaking
Автор

what is the name of the theme you are using

Kayameren