Answer:#include <stdio.h>
int main() {
int num;
printf("Enter an integer: ");
scanf("%d", &num);
// true if num is perfectly divisible by 2
if(num % 2 == 0)
printf("%d is even.", num);
else
printf("%d is odd.", num);
return 0;
}
Answer:
1.word = "George slew the dragon"
startIndex = word.find('dr')
endIndex = startIndex + 4
drWord = word[startIndex:endIndex]
2. sentence = "Broccoli is delicious."
sentence_list = sentence.split(" ")
firstWord = sentence_list[0]
Explanation:
The above snippet is written in Python 3.
1. word is initialized to a sentence.
Then we find the the occurence of 'dr' in the sentence which is assign to startIndex
We then add 4 to the startIndex and assign it to endIndex. 4 is added because we need a length of 4
We then use string slicing method to create a substring from the startIndex to endIndex which is assigned to drWord.
2. A string is assigned to sentence. Then we split the sentence using sentence.split(" "). We split based on the spacing. The inbuilt function of split returns a list. The first element in the list is assigned to firstWord. List uses zero based index counting. So. firstWord = sentence_list[0] is use to get first element.
3.5X2 cannot be the answer as it too small and not enough information can be put into it. The common size for tri-fold brochures is 8.5X11 or letter size even when 8.5X14 is also a size used it is not the most common size.
Answer:
Answered below
Explanation:
With the evolution and growth of technology, and as we are increasingly having our everyday lives dependent on technology, there arise problems that shouldn't be ignored.
Security of people's personal data and information is of paramount importance. Access to personal information and the sale of these information to companies without the owner's permission is a breach of privacy and one of the challenges we face today.
With the growth of data, there are newer threats and attacks on software security systems to steal these data and therefore there's a need for everyday assessment and improvement in security of data.