Posts by V. Rodrigues • 75 points
4 posts
- 
		4 votes1 answer44 viewsQ: Validate from 1 to 6 digits, the first of which cannot be zeroHow is regex to validate the following rule: Numbers only; A maximum of 6 numbers, and a minimum of 1; The first number needs to be different from 0; I tried it this way and it didn’t work:… regexasked V. Rodrigues 75
- 
		1 votes1 answer39 viewsQ: Why specify a number of assertions explicitly in my test?I started studying unit tests with Jest, but I didn’t really understand the use of expect.assertions when testing with Javascript. Let’s consider the example given below by the Jest documentation… 
- 
		0 votes1 answer106 viewsQ: Script with Node.js not generating outputHello! I started to solve problems of the Urionlinejudge platform and in the first challenge I already had doubts about the solution with Node.js. The problem only asks to insert two integers (one… 
- 
		2 votes5 answers106673 viewsA: How to generate random numbers in Python?I leave here a suggestion function, which generates random numbers (from 0.0 to 1.0) in a vector with a given size: def gerar(): from random import random tamanho = int(input()) resposta = [0.0] *…