Answer:
See explaination
Explanation:
#Run the code in the python version 3.x.
#Define the function.
def shampoo_instructions(num_cycles):
#Check the cycles to be greater than 1.
if num_cycles < 1:
#Display the statement.
print('Too few.')
#Check the cycles to be greater than 4.
elif num_cycles > 4:
#Display the statement.
print('Too many.')
#The else part.
else:
#Initialize the variable.
N = 1;
#Begin the for loop.
for N in range(N, num_cycles+1):
#Print the result.
print(N , ": Lather and rinse.")
#Print the statement.
print('Done.')
#Call the function.
shampoo_instructions(2)
Last week, Nate and I counted all the inventory. answer :A
Answer:First of all, to work safely at the internet you should avoid any not secure page, and if you can’t do that, avoid entering stuff such as credit cards or passwords on this sites. Now, to work safely it’s recomendable to have a VPN(virtual private network), that hides your IP direction.
Explanation:
Answer:
float diameter=2*r; //hold the diameter of a circle
float PI; // float variable named PI.
Explanation:
Here we have declared two variable i.e diameter and PI of type float. The variable diameter will hold the diameter of a circle i.e 2*r where r is the radius of a circle.
Following are the program in c++
#include <iostream> // header file
using namespace std; // namespace
int main() // main function
{
float r=9.2; // variable declaration
float diameter=2*r; //hold the diameter of a circle
float PI=3.14; // float variable named PI hold 3.14
cout<<"diameter IS :"<<diameter<<endl<<"PI IS :"<<PI; // display value
return 0;
}
Output:
diameter IS :18.4
PI IS :3.14