Php Laravel Developer Interview Questions

150 php laravel developer interview questions shared by candidates

This task is to write a function to check whether the inputted number is a prime number. If the inputted number is not a prime number, return "Not a prime". If the inputted number is a prime number then return the average value of ALL the prime numbers that are less than and including the inputted number. Example For input = 5, the output should be 3.33 (2 + 3 + 5) / 3 = 3.33 Note: - A prime number is a whole number greater than 1 whose only factors are 1 and itself. A factor is a whole number that can be divided evenly into another number. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. - 1 is not considered a prime number because it has only one factor.
avatar

PHP Laravel Developer

Interviewed at Jewel Pro Tech

3.9
Jun 18, 2024

This task is to write a function to check whether the inputted number is a prime number. If the inputted number is not a prime number, return "Not a prime". If the inputted number is a prime number then return the average value of ALL the prime numbers that are less than and including the inputted number. Example For input = 5, the output should be 3.33 (2 + 3 + 5) / 3 = 3.33 Note: - A prime number is a whole number greater than 1 whose only factors are 1 and itself. A factor is a whole number that can be divided evenly into another number. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. - 1 is not considered a prime number because it has only one factor.

Viewing 91 - 100 interview questions

Glassdoor has 150 interview questions and reports from Php laravel developer interviews. Prepare for your interview. Get hired. Love your job.