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
Blizzard [7]
3 years ago
10

def retry(operation, attempts): for n in range(attempts): if operation(): print("Attempt " + str(n) + " succeeded") ___ else: pr

int("Attempt " + str(n) + " failed") retry(create_user, 3) retry(stop_service, 5)
Computers and Technology
1 answer:
marusya05 [52]3 years ago
6 0

Answer:

Following are the missing code to this question:

break;

Explanation:

In the given python code, a method "retry" is defined, that accepts two-variable, that is "operation and attempts" in its parameters, inside the method a for loop is defined that uses the n variable to holds attempt values and define the conditional statement.

  • Inside if block, it checks if the operation value is true, it will print a successful attempts values and break the condition, otherwise it will goto else block.
  • In the else block, it will print failed attempts values.  
You might be interested in
Online activities among businesses
Masja [62]

Some of the online activities among businesses are:

  • SEO consultant. ...
  • Web designer or web developer. ...
  • Blogger. ...
  • Virtual assistant. ...
  • Affiliate marketer, etc

<h3>What are Online Activities?</h3>

This refers to the various activities that are done on the world wide web and is usually used by businesses to increase visibility, and in turn, revenue.

Hence, we can see that the use of online activities by businesses are important because the products and services for sale by businesses are advertised to target audiences through some of the aforementioned activities.

Read more about online activities among businesses here:

brainly.com/question/27172895

#SPJ1

3 0
2 years ago
Should spreadsheets be used to keep score of a baseball game?<br><br> YES<br> NO
AysviL [449]
Yes, a spreadsheet can do the maths for you
4 0
2 years ago
A Silicon Valley billionaire purchases 3 new cars for his collection at the end of every month. Let a_n denote the number of car
Ket [755]

Answer:

a_8 =47

The cost of maintenance for 2 years is $69000

Explanation:

a.) a_0 = 23 is the number of cars at the beginning of the first month. At the end of the first month a_1 = 26 cars. This is due to the addition of extra 3 cars.

The Arithmetic Progression equation will be used to solve this question.

T(n) = a + (n-1)×d

Where

T(n) is the number of cars after n months

a is the number ofr cars at the end bbn of the first month; 26

d is the monthly car increment; 3

Substituting a and d into the equation, the equation reduces to

T(n)= 23 + 3n

For number of cars after 8 month a_8;

T(8)= 23 + 3(8)

T(8) = 47

b.) The maintenance cost at the first month is $50× 23 cars= $1150, for the second month $50 × 26 cars= $1300, for the third month $50 × 29 cars = $1450. The monthly increment is $150.

Arithmetic Progression will also be used to solve this problem.

Sm = n/2 [2a + (n-1)×d]

Where

Sn is the sum of maintenance cost for months n

a is the maintenance cost of the first month; $1150

d is the monthly increment; $150

Inserting a and d into the formula,Sn reduces to

Sn= n/2[2150 + 150n]

Inputting 24months (2 years) as n on the equation above

Sn= 24/2[2150 + 150×24]

Sn= $69000

6 0
4 years ago
Write a complete Java program called Rooter that gets a positive integer called "start" from the user at the command line and th
Nataly_w [17]

Answer:

The program in Java is as follows:

import java.util.*;

import java.lang.Math;

public class Rooter{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int start;

 System.out.print("Start: ");

 start = input.nextInt();

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }

}

}

Explanation:

This declares start as integer

 int start;

This prompts the user for input

 System.out.print("Start: ");

This gets input for start

 start = input.nextInt();

The following is repeated until the user input is valid i.e. positive

<em>  while(start<=0){</em>

<em>      System.out.print("Number must be positive\nStart: ");</em>

<em>      start = input.nextInt();  }</em>

The following while loop prints the square root of each number till 0

<em>  while(start>=0){</em>

<em>      System.out.println(Math.sqrt(start));</em>

<em>      start--;  }</em>

4 0
3 years ago
Todas las computadoras son controladas por hardware?
mixas84 [53]

Answer:

"La placa base está compuesta de más partes que alimenten y controlen el equipo. A diferencia del software, el hardware es una entidad física. ... Sin embargo, sin la creación de hardware para realizar tareas dirigidas por software a través de la unidad central de procesamiento, el software sería inútil."

Explanation:

(Sorry, I don't know much Spanish, so there might be mistakes. I hope this helps you.)

7 0
3 years ago
Other questions:
  • The set of specific, sequential steps that describe exactly what a computer program must do to complete the work is called a(n)
    10·2 answers
  • Assume that the main method of the class named Welcome does not contain any compile-time errors. What is the name of the file ge
    11·1 answer
  • Collins and quillian explained the results of priming experiments by introducing the concept of _____ into their network model.
    12·1 answer
  • A windows host sends a tcp segment with source port number 1200 and destination port number 25. the sending host is a(n) _______
    10·1 answer
  • An interactive media professional would most likely help with
    7·2 answers
  • Which term refers to computer programs that provide computer users with a graphical interface to the internet?
    12·1 answer
  • adding ______around calculations indicates which calculations should be performed first before following the typical order of op
    6·1 answer
  • Which of the following correctly shows the general structure of a for-each loop header?for (initialization; condition; increment
    9·1 answer
  • Which of the following statements is NOT true regarding the Security Configuration and Analysis (SCA) tool?
    12·1 answer
  • 1 paint 2 anahaw leaf 3 shellac 4 varnish 5 metal sheets 6 paint 7 G.I. pipe 8 enamel paint 9 bamboo 10 fillers
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!