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]
2 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]2 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
A have a string, called "joshs_diary", that is huge (there was a lot of drama in middle school). But I don't want every one to k
Norma-Jean [14]

Answer:

C and G

Explanation:

In C language, the asterisks, ' * ', and the ampersand, ' & ', are used to create pointers and references to pointers respectively. The asterisks are used with unique identifiers to declare a pointer to a variable location in memory, while the ampersand is always placed before a variable name as an r_value to the pointer declared.

5 0
3 years ago
Edhesive unit 2 lesson 5 coding activity 1 Write code which creates three regular polygons with 11, 14 and 19 sides respectively
SVEN [57.7K]

Answer:

public class Polygon {

   private String name;

   private int sides;

   private double sideLength;

   public Polygon(String name, int sides, double sideLength) {

       if (sideLength <= 0) throw new IllegalArgumentException("Length cannot be zero or negative.");

       if (sides <= 0) throw new IllegalArgumentException("Sides cannot be zero or negative.");

       this.name = name;

       this.sides = sides;

       this.sideLength = sideLength;

   }

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public double getSideLength() {

       return sideLength;

   }

   public void setSideLength(double sideLength) {

       if (sideLength <= 0) throw new IllegalArgumentException("Length cannot be zero or negative.");

       this.sideLength = sideLength;

   }

   public int getSides() {

       return sides;

   }

   public void setSides(int sides) {

       this.sides = sides;

   }

   (use the at sign here)Override

   public String toString() {

       return "regular " + name + " with side length " + String.format("%.1f", sideLength);

   }

}

public class TestPolygon {

   public static void main(String[] args) {

       Polygon sides11 = new Polygon("hendecagon", 11, 1);

       Polygon sides14 = new Polygon("tetrakaidecagon", 14, 1);

       Polygon sides19 = new Polygon("enneadecagon", 19, 1);

       System. out. println(sides11);

       System. out. println(sides14);

       System. out. println(sides19);

   }

}

Explanation:

This java source code defines a class that creates a regular polygon based on the number of sides given to it.

Below is a screenshot of the program code and output.

4 0
2 years ago
A built-in ____ in your personal computer can make it simpler to transfer photos from a solid state memory card used in your dig
zhannawk [14.2K]
A built-in File Manager is the answer
4 0
3 years ago
9.5 Code Practice edhesive
Ann [662]

Answer:

a = [[34,38,50,44,39],

    [42,36,40,43,44],

    [24,31,46,40,45],

    [43,47,35,31,26],

    [37,28,20,36,50]]

   

sum=0

for r in range(len(a)):

   for c in range(len(a[r])):

       sum = sum + a[r][c]

       

       

print("Sum of all values: " + str(sum) + "\n\n")

print("Average of all values: " + str(sum / (len(a) * len(a))))

Explanation:

I got 100%.

3 0
3 years ago
Read 2 more answers
Which type of network medium is used by an integrated services digital network adapter?
user100 [1]
ISDN uses a two-wire telephone line.
8 0
3 years ago
Other questions:
  • Network firewall entry and exit points are called
    6·1 answer
  • Due to the internal style sheets of some browsers, your website may look different to someone who is using firefox as opposed to
    11·1 answer
  • Which of the following is not a common network architecture type?
    9·1 answer
  • Does anyone have game design in connections
    13·1 answer
  • 1. ___________ ensures the integrity and security of data that are passing over a network.
    13·1 answer
  • Which of these components is a part of the Central Processing Unit (CPU) of a computer?
    11·2 answers
  • I am a receptionist for a large corporation what career cluster is this in?
    13·2 answers
  • How do i work on code with someone else? i use visual studio code. me and a friend wanna make a game together with code. how do
    8·1 answer
  • You can specify a column width of 0 to ____________.
    13·2 answers
  • 9. These particular machines can be decentralized.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!