Answer:
c. your friend can hash all possible options and discover your secret.
Explanation:
SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.
Answer:
int age = 10;
switch (age){
case 0:
case 1:
System.out.println("ineligible");
break;
case 2:
System.out.println("toddler");
break;
case 3:
case 4:
case 5:
System.out.println("early childhood");
break;
case 6:
case 7:
System.out.println("young reader");
break;
case 8:
case 9:
case 10:
System.out.println("elementary");
break;
case 11:
case 12:
System.out.println("middle");
break;
case 13:
System.out.println("impossible");
break;
case 14:
case 15:
case 16:
System.out.println("high school");
break;
case 17:
case 18:
System.out.println("scholar");
break;
default:
System.out.println("ineligible");
}
Explanation:
In java and many other programming languages, a switch statement is a way of having multiple branching options in a program. This is usually considered a more efficient way than using multiple if....else if statements. and the expression variables could be byte, char int primitive data types. etc. every branch (option) in a switch statement is followed by the break statement to prevent the code from "falling through". In the question The variable age is declared as an int and initialized to 10. and tested against the conditions given in the question.
Answer:
a fix any syntax bugs. I looked it up on the internet so you should be good good luck on your test
<span>As these technologies are rapidly evolving a functionalist would say that they unbalance the equilibrium of the social state, and is therefore undesirable as there is more interaction and adaptation of habits from other societies.
But they also say that it's not a good thing to change immediately because it might disrupt the society. Therefore it has to change slowly. </span>
Answer:
function countWords(sentence) {
return sentence.match(/\S+/g).length;
}
const sentence = 'This sentence has five words ';
console.log(`"${sentence}" has ${countWords(sentence)} words` );
Explanation:
Regular expressions are a powerful way to tackle this. One obvious cornercase is that multiple spaces could occur. The regex doesn't care.