+ 1

Guys I need help with this code please, what does 'random.randint' mean in python, I saw it under OOP in magic methods.

It is located in intermediate python, under Object Oriented Programming in magic methods & operations.

14th Feb 2023, 6:06 PM
Olaosilo Emmanuel
Olaosilo Emmanuel - avatar
2 odpowiedzi
+ 7
**random** is a module imported to add some functionality to a program. **randint** is a function inside **random**. This function will generate a random integer between specified numbers(argument1 and argument2) **random.randint(argument1, argument2)** — is just a way of calling that function
14th Feb 2023, 6:10 PM
Lamron
Lamron - avatar
+ 1
@ Lamron thanks for the explanation, now I understand it better.
15th Feb 2023, 10:16 PM
Olaosilo Emmanuel
Olaosilo Emmanuel - avatar