Answer:
def print_popcorn_time(bag_ounces):
if bag_ounces<3:
print("Too Small")
elif bag_ounces>10:
print("Too Large")
else:
total = 6*bag_ounces
print('{} seconds'.format(total))
Explanation:
Using Python programming language
The function is defined to accept a single parameter
Using a combination of if/elif/else statements, the approprite message is displayed when the function is called
Answer:
When searching for articles using library databases, the following tips should increase the relevance of your results. Quotation marks around two or more keywords - phrase searching - ensures that the results will include the exact phrase.
Explanation:
Cognitive surplus results when leisure time and available tools allow us to engage in creative acts. It is a term that was introduced by Clay Shirky which pertains to the synthesis of the excess of people's energy, time and creativity leading to productivity sharing and creation.
Answer:
Following are the code block in the Java Programming Language.
//define recursive function
public static long exponentiation(long x, int n) {
//check the integer variable is equal to the 0.
if (x == 0) {
//then, return 1
return 1;
}
//Otherwise, set else
else {
//set long data type variable
long q = exponentiation(x, n/2);
q *= q;
//check if the remainder is 1
if (n % 2 == 1) {
q *= x;
}
//return the variable
return q;
}
}
Explanation:
<u>Following are the description of the code block</u>.
- Firstly, we define the long data type recursive function.
- Then, set the if conditional statement and return the value 1.
- Otherwise, set the long data type variable 'q' that sore the output of the recursive function.
- Set the if conditional statement and check that the remainder is 1 and return the variable 'q'.
Answer:
The configuration of the R1 is as follows
Explanation:
Router>enable
Router#show running-config
Router#show startup-config
Router#configure terminal
Router(config)#hostname R1
R1(config)#line console 0
R1(config-line)#password letmein
R1(config-line)#login
R1(config-line)#exit
R1(config)#enable password cisco
R1(config)#enable secret itsasecret
R1(config)#service password-encryption
R1(config)#banner motd #Unauthorized access is strictly prohibited#
R1(config)#end
R1#exit
R1>enable
R1#copy running-config startup-config
R1#show flash
R1#copy startup-config flash