Answer:
list1=[]
n=10
for i in range(n):
z=int(input("Enter number:"))
list1.append(z)
print(list1)
The answer & explanation for this question is given in the attachment below.
def quadruple(n):
return n*4
print(quadruple(3))
print(quadruple(1))
print(quadruple(2))
I wrote my code in python 3.8. I hope this helps.
Answer:
Following are the code in c language
#include <stdio.h> // header file
int main() // main function
{
int n1,i;
float avg,x,s=0; // variable declaration
printf("\nEnter How many Number terms you want:");
scanf("%d",&n1); // input terms by user
for(i=0;i<n1;++i)
{
scanf("%f",&x); // user input
s= s +x; //calculate sum
}
avg = s/n1;// calculate average of n number
printf("\nThe average of n number is:");
printf("%f",avg); // display average
return 0;
}
Output
Enter How many Number terms you want:3
3
4
3
The average of n number is:3.333333
Answer:
To make text centered, select and highlight the text first, then hold down Ctrl (the control key) on the keyboard and press E. To make text right aligned, select and highlight the text first, then hold down Ctrl (the control key) on the keyboard and then press R.
Explanation: