Answer:
Program :
def var_input():
#input function which takes the radius as input.
radius= float(input("Enter the radius of the sphere"))
#statemet to take the inputs.
volume(radius) /#call the volume function.
def volume(radius): #definition of volume function.
print("The volume of the sphere is :"+"{:.2f}".format((4/3)*(22/7)*radius*radius*radius)) # print the volume of the sphere.
var_input() # calling the input function.
Output:
- If the user inputs 4, then he will gets "268.19" as the output.
- If the user inputs 5, then he will gets "523.81" as the output.
Explanation:
- The above code is in python language, in which the first line is used to call the function.
- Then the first line of the input function is used to render the message to the user and take the inputs from the user and store it into the radius variable.
- Then the second line calls the volume function by passing the radius value.
- Then the volume function calculates the volume and prints it.
Like when a seed drops on the ground, and a bee come to take some honey. It sticks to the bee and where the bee goes, the bee will rub it off and the seed will start to grow.
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
#define MAX 1005
bool already_present(int data[MAX], int input, int size)
{
int i;
for(i=0;i<size;i++)
if(data[i] == input)
return true;
return false;
}
int read_stdin(int data[MAX])
{
int input;
int size=0;
while(true)
{
cout<<"Enter a non-negative integer (negative to quit): ";
cin>>input;
if(input<0)
break;
if(!already_present(data,input,size))
data[size++] = input;
}
return size;
}
void print_stdout(int data[MAX],int size)
{
int i;
cout<<"You entered\n";
for(i=0;i<size;i++)
cout<<data[i]<<" ";
cout<<endl;
}
int main()
{
int data[MAX],size;
size = read_stdin(data);
print_stdout(data,size);
return 1;
}
Answer:
digital pages and virtual paper pages
It can cause a sudden or devastating change in the environment.