1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elanso [62]
3 years ago
9

Write a function named ilovepython that prints out I love Python three times. Then, call that function.

Computers and Technology
1 answer:
Brums [2.3K]3 years ago
8 0

Answer:

The program to this question can be described as follows:

Program:

def ilovepython(): #defining a method

   for i in range(3): #defining a loop that print messasge three times

       print('I love Python')#print messasge

ilovepython() #calling the method

Output:

I love Python

I love Python

I love Python

Explanation:

Description of the python program can be described as follows:

  • In the above Python program, a method "ilovepython" is defined, inside the method a for loop is used, inside the loop print method is used, that print the message "I love Python".
  • In python for loop is used to iterate over series and we can execute a set of statements with the loop, tuple, series, once for each element in the list.
You might be interested in
Name a network device which would have to be
VMariaS [17]

Answer:

network interface card (NIC).

4 0
3 years ago
Create a structure representing a student. The member variables should include student name, student ID, and four test grades fo
Neporo4naja [7]

Answer:

Output:

Name: Brainly

ID:0001

Write the 4 tests grades of the student separated by space :10 9 8 10

Brainly

0001

10 9 8 10

Average :9.66667

'1' to continue '0' to exit :

Explanation:

#include<iostream>

#include<string>

using namespace std;

//variables declaration

struct Student {

  string id; //string declaration ID

  string name; // string declaration name

  int grades[4]; //array of 4 because it is 4 grades

};

//definition of the function get information

void inputData(Student &s){

 

   

   cout << "Name:" ;

   getline(cin,s.name);

   cout << "ID:";

   cin >> s.id;

   cout << "Write the 4 tests grades of the student separated by space :";

   for (int i = 0; i<4; i++)

       cin >> s.grades[i];

}

//definition of the function of average

double inputAvg(Student s){

   double summation;

   int temporary;

   double average;

   for (int i = 0; i<4; i++){  

      for (int j = i; j<4; j++){

         if (s.grades[j] > s.grades[i]){

             temporary = s.grades[i];

             s.grades[i] = s.grades[j];

             s.grades[j] = temporary;

         }

      }

    }

    summation = 0;

    for (int i = 0; i<3; i++){

        summation = summation + s.grades[i];  

    }

    average = summation/3;

    return average;

}

void disp(Student *s){

   cout << s->name << endl;

   cout << s->id << endl;

   for (int i = 0; i<4; i++)

       cout << s->grades[i] << " ";

   cout << endl;

   cout << "Average :" << inputAvg(*s) << endl;

   

}

int main(){

  Student st;

  int ch;

  while(true){

      inputData(st);

      disp(&st);

      cout << " '1' to continue '0' to exit :";

      cin >> ch;

      if (ch == 0)

         break;      

  }

  return 0;

}

6 0
3 years ago
Mike Reid is on the analysis phase of a project which is developing smile shutter cameras.
zavuch27 [327]

Answer:

The correct answer to the following question will be Option C (requirement analysis).

Explanation:

This is the mechanism of identifying the clients' requirements for such an application or framework to be constructed or updated.

  • It includes almost all of the activities accomplished to determine the expectations of the various stakeholders.
  • The methodology of parameters consequently involves the analysis, reporting, testing, and management of software or program specifications.

The other three options are not related to the given scenario. So that Option C is the right answer.

8 0
3 years ago
A manager would like information on the knowledge base searches conducted by customers and call center agents. Which two metrics
RideAnS [48]

Answer:

Option A and Option D are the correct options.

Explanation:

While any information is provided by the manager to its customers which is based on the knowledge of the search conducted.

So, the following knowledge is about the article of the lowest rating and about the search query that has no output.

  • Option B is not correct for the following scenario because the manager is informing about the searches conducted by customers, not for the data category.
  • Option C is not correct for the following scenario because the articles are not created by them.
3 0
3 years ago
The arguments supplied to the IF function, in order, are the condition for execution, a. and the range of cells to test. b. the
Oksi-84 [34.3K]

Answer:

D. the result if condition is true, and the result if condition is false.

Explanation:

The syntax for the IF function is IF(logical_test, value_if_true, [value_if_false]). Therefore, the arguments supplied to the IF function, in order, are the condition for execution, the result if the condition is true, and the result if the condition is false.

4 0
3 years ago
Other questions:
  • If all of Earth's history were squeezed into one 12-hour period, how long ago did Precambrian time end? How long did the Cenozoi
    15·1 answer
  • ASAP
    12·2 answers
  • What is one strengths of line graph? a) Line graphs show percentage in a whole b) Line graphs show change over time c) Line grap
    13·2 answers
  • Write a C function (NOT A COMPLETE PROGRAM)which takes three parameters which are the cost for an item in a grocery store, the q
    12·1 answer
  • Media applications that play audio or video files are part of a class of workkloads called "streaming" workloads (i.e., they bri
    9·1 answer
  • ___________ is a task pane used to correct grammar errors; opens when you click the Spelling &amp; Grammar button in the Proofin
    15·2 answers
  • True or false: in order to keep yourself and co workers safe, you must be able to recognize electrical hazards
    8·2 answers
  • 12. Realizar un algoritmo que genere un número aleatorio, el usuario debe adivinar cual es el número generado para esto tendrá 3
    10·1 answer
  • Should-the-government-allow-illegal-immigrants-to-become-citizens
    12·1 answer
  • Mention five of the format tools use to edit a picture in a word document<br>​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!