Soluții

How to protect PDF File with password using Microsoft Office’s In-built Tools

PDF is one of the most secure and reliable file formats to share your work with people. You can even increase its security by encrypting it with a password to prevent unauthorized access. You can create and secure your own PDF file with the help of Microsoft’s in-built features that come pre-installed with the Office Suite. With the help of Microsoft Word, you can create a PDF file and encrypt it by adding a password to it.

[mai mult...]

Check if all digits of a number divide it with Python3

Given a number n, find whether all digits of n divide it or not.

Examples:

Input : 128
Output : Yes
128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0.

Input : 130
Output : No

We want to test whether each digit is non-zero and divides the number. For example, with 128, we want to test d != 0 && 128 % d == 0 for d = 1, 2, 8. To do that, we need to iterate over each digit of the number.

[mai mult...]