Answer:
li=list(map(str,input().strip().split()))#taking input of the string.
#swapping first and last element.
temp=li[0]
li[0]=li[-1]
li[-1]=temp
print(li)#printing the list.
Explanation:
I have taken the list li for taking the input of strings.Then after that swapping first and last element of the list.Then printing the list.
0.0005 x 10⁻⁴ Farad = 0.000 000 05 Farad.
1 pF = 0.000 000 000 001 Farad
Divide them and get 50000 pF.
Answer:
upload; download
Explanation:
FTP (File Transfer Protocol) is an internet protocol used to upload and download a file to a server, there are some programs help us to transfer this data to a server, in some cases, we're going to need these programs to upload website files to the server like images or videos, or some websites where do you need a user and passwords to upload file by FTP
Answer:
Explanation:
#include<iostream>
#include<ctime>
#include<bits/stdc++.h>
using namespace std;
double calculate(double arr[], int l)
{
double avg=0.0;
int x;
for(x=0;x<l;x++)
{
avg+=arr[x];
}
avg/=l;
return avg;
}
int biggest(int arr[], int n)
{
int x,idx,big=-1;
for(x=0;x<n;x++)
{
if(arr[x]>big)
{
big=arr[x];
idx=x;
}
}
return idx;
}
int main()
{
vector<pair<int,double> >result;
cout<<"Enter 1 for iteration\nEnter 2 for exit\n";
int choice;
cin>>choice;
while(choice!=2)
{
int n,m;
cout<<"Enter N"<<endl;
cin>>n;
cout<<"Enter M"<<endl;
cin>>m;
int c=m;
double running_time[c];
while(c>0)
{
int arr[n];
int x;
for(x=0;x<n;x++)
{
arr[x] = rand();
}
clock_t start = clock();
int pos = biggest(arr,n);
clock_t t_end = clock();
c--;
running_time[c] = 1000.0*(t_end-start)/CLOCKS_PER_SEC;
}
double avg_running_time = calculate(running_time,m);
result.push_back(make_pair(n,avg_running_time));
cout<<"Enter 1 for iteration\nEnter 2 for exit\n";
cin>>choice;
}
for(int x=0;x<result.size();x++)
{
cout<<result[x].first<<" "<<result[x].second<<endl;
}
}
Answer:
The FIND function returns the position (as a number) of one text string inside another. If there is more than one occurrence of the search string, FIND returns the position of the first occurrence. FIND does not support wildcards, and is always case-sensitive.
Explanation: