Answer:
# string_contains function is defined with input_string
# as arguments
def string_contains(input_string):
# if-statement that check if letter z is in input_string
if 'z' in input_string:
# it print"has the letter z" if it has z
print("has the letter z")
else:
# else it print "not worthwhile"
print("not worthwhile")
# string_contains function is called
string_contains("The animal is zebra")
string_contains("learning is fun")
Explanation:
The code is written in Python and well commented.
Image of the output when the function is called is attached.
Answer:
Explanation:
Complete question:
Fill in the blanks
One or more parties may terminate an agency relationship by placing into the agreement a time period for termination. When that time ,___1______the agency ends. In addition, the parties can specify that the agency is for a particular____2______ . Once that is achieved, the agency ends. Alternatively, the parties can include a specific event as a trigger for termination; once that event,_____3______ the agency ends. The parties can terminate an agency relationship prior to any of the preceding events by ______4_________agreement, or revocation_____5______ by individual party.
Answer
1) lapses
(2) purpose
(3) occurs / begins
(4) mutual
(5) either
Answer: Find the answer in the explanation
Explanation:
Helmets are manufactured by the use of different categories of polymer. The common material used for manufacturing of helmets are:
1. Polycarbonate
2. Styrofoam
3. Foam
4. Acrylic and polycarbonate
5. Nylon
All the polymer used for the manufacturing of helmets fall under synthetic and semi synthetic categories of polymer.
The styrofoam is classified under addition polymerization. While the nylon is classified under condensation polymerization.
The low density polythene used is classified as branch chains polymer. While the polycarbonate is of high tensile strength with strong mechanical properties.
Answer:
Explanation:
/* General Code for achieving perfect error for any level and any
digit of codewords*/
#include<iostream>
using namespace std;
int main(){
int level;
//Input memory levels.
cout <<" Enter number of Flash Memory levels : ";
cin>>level;
//construct array store levels.
int lvl[level];
for(int i = 0; i < level; i++){
//assign levels name
lvl[i] = i;
}
int digit;
cout << "Enter number of digit codewords :";
//Taking input of codeword digits
cin >> digit;
for(int i = 0; i < level;){
//output Codeword
cout << lvl[i];
//Skipping for n number digit codeword in level
i+=(digit+1);
}
}
/*
a) i from 0 to (i = i+(2+1))<levels
b) for length (1) -> 3 codewords
codewords -> {0,2,4}
for length (2) -> 2 codewords
codewords -> {0,3}
*/