Is a Number Prime in Java
The challenge
Define a function that takes one integer argument and returns a logical value true or false depending on if the integer is a prime.
Per …
Read Article →In-depth guides, insights, and best practices for modern software engineering
Define a function that takes one integer argument and returns a logical value true or false depending on if the integer is a prime.
Per …
Read Article →Write a function minutesToMidnight(d) that will take a date object as the parameter. Return the number of minutes in the following …
Read Article →If you have a file on your machine, and you want to change the created/modified time/date stamp, then you can use the touch command.
touch -t …
Read Article →
Given an integer as input, can you round it to the next (meaning, “higher”) multiple of 5?
Examples:
input: output:
0 …
Read Article →
Your task is to write a function that returns the sum of the following series up to nth term(parameter).
Series: 1 + 1/4 + 1/7 + 1/10 + …
Read Article →
Wilson primes satisfy the following condition. Let P represent a prime number.
Then ((P-1)! + 1) / (P * P) should give a whole number. …
Create a new AWS EC2 instance, and set the User Script to the following:
#!/bin/bash
sudo su
yum update -y
yum install -y httpd.x86_64
systemctl start …
Read Article →
Christmas is coming and many people dreamed of having a ride with Santa’s sleigh. But, of course, only Santa himself is allowed to …
Read Article →Return a new array consisting of elements which are multiple of their own index in input array (length > 1).
Examples:
[22, -6, 32, …
Read Article →When provided with a letter, return its position in the alphabet.
Input :: “a”
Ouput :: “Position of alphabet: …
Read Article →Alex just got a new hula hoop, he loves it but feels discouraged because his little brother is better than him
Write a program where …
Read Article →Bob is working as a bus driver. However, he has become extremely popular amongst the city’s residents. With so many passengers …
Read Article →