Answer:
Following are the correct python code to this question:
n1 = float(input('Input first number: '))#input first number
n2 = float(input('Input second number: '))#input second number
n3 = float(input('Input third number: '))#input third number
n4 = float(input('Input fourth number: '))#input fourth number
average = (n1+n2+n3+n4)/4 #calculate input number average
product = n1*n2*n3*n4 # calculate input number product
print('product: {:.0f} average: {:.0f}'.format(round(product),round(average))) #print product and average using round function
print('product: {:.3f} average: {:.3f}'.format(product,average)) #print product and average value
Output:
Please find the attachment.
Explanation:
The description of the above python code can be defined as follows:
- In the above python program four variable "n1, n2, n3, and n4" is defined, in which we take input from the user end, and in these user inputs we use the float method, that converts all the input value in to float value.
- In the next step, two variable average and product are defined, that calculate all input numbers product, average, and hold value in its variable.
- In the last line, the print method is used, which prints its variable value by using a round and format method.
Answer:
#include <stdio.h>
#include <ctype.h>
void printHistogram(int counters[]) {
int largest = 0;
int row,i;
for (i = 0; i < 26; i++) {
if (counters[i] > largest) {
largest = counters[i];
}
}
for (row = largest; row > 0; row--) {
for (i = 0; i < 26; i++) {
if (counters[i] >= row) {
putchar(254);
}
else {
putchar(32);
}
putchar(32);
}
putchar('\n');
}
for (i = 0; i < 26; i++) {
putchar('a' + i);
putchar(32);
}
}
int main() {
int counters[26] = { 0 };
int i;
char c;
FILE* f;
fopen_s(&f, "story.txt", "r");
while (!feof(f)) {
c = tolower(fgetc(f));
if (c >= 'a' && c <= 'z') {
counters[c-'a']++;
}
}
for (i = 0; i < 26; i++) {
printf("%c was used %d times.\n", 'a'+i, counters[i]);
}
printf("\nHere is a histogram:\n");
printHistogram(counters);
}
<h2>
Answer:</h2>
The following statement is TRUE.
LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to see where you stand as compared to your classmates in terms of your mastery of grammar and vocabulary concepts.
<h2>
Explanation:</h2>
LearnSmart is an adaptive technology that is helping a lot of students by letting them judge which parts/topics of the book are not clearly learnt by them and which of them are under their grip.
LearnSmart provides cards with short term questions that make i possible for students to complete their preparation in short time. In addition to this smart flash card assignments are a to compare students preparation relatively.
<h3>I hope it will help you!</h3>
<span>abstraction possibly </span>
Most computers have three types of ports: serial, parallel, and USB. A serial port is a type of interface that connects a device to the system unit by transmitting data only one bit at a time. Serial ports usually connect devices that do not require fast data transmission rates, such as a mouse, keyboard, or modem.