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
djverab [1.8K]
3 years ago
6

Write a method called printRangeOfNumbers that accepts a minimum, maximum numbers as parameters and prints each number from mini

mum up to that maximum, inclusive, boxed by curly brackets. For example, consider the following method calls:
Computers and Technology
1 answer:
timama [110]3 years ago
5 0

Answer:

The method in python is as follows:

class myClass:

    def printRange(min,max):

         for i in range(min, max+1):

              print("{"+str(i)+"} ", end = '')

           

Explanation:

This line declares the class

class myClass:

This line defines the method

    def printRange(min,max):

This line iterates from min to max

         for i in range(min, max+1):

This line prints the output in its required format

              print("{"+str(i)+"} ", end = '')

You might be interested in
For a new version of processor, suppose the capacitive load remains, how much more energy will the processor consume if we incre
xxMikexx [17]

Answer:

72.80 % more energy will be consumed.

Explanation:

First of all, let us have a look at the formula of energy for a processor.

E = CV^2f

Where, E is the energy

C is the capacitance

V is the voltage and

f is the clock rate.

Let E_1 be the energy of older processor.

C_1 be the capacitance of older processor.

V_1 be the voltage of older processor

f_1 be the capacitance of older processor

So, E_1 = C_1V_1^2f_1 ....... (1)

and

Let E_2 be the energy of newer processor.

C_2 be the capacitance of newer processor.

V_2 be the voltage of newer processor

f_2 be the capacitance of newer processor

E_2 = C_2V_2^2f_2 ....... (2)

Dividing equation (2) with equation (1):

\dfrac{E_2}{E_1} = \dfrac{C_2V_2^2f_2}{C_1V_1^2f_1}

As per given statement:

C_1=C_2

V_2=1.2\times V_1

f_2=1.2\times f_1

Putting the values above:

\dfrac{E_2}{E_1} = \dfrac{C_1\times (1.2V_1)^2\times 1.2f_1}{C_1V_1^2f_1}\\\Rightarrow \dfrac{E_2}{E_1} = \dfrac{(1.2)^2\times 1.2}{1}\\\Rightarrow \dfrac{E_2}{E_1} = 1.728\\\Rightarrow \bold{E_2 = 1.728 \times E_1}

Energy consumed by newer processor is <em>1.728 </em>times the energy consumed by older processor.

OR

<em>72.80 %</em> more energy will be consumed by the newer processor.

4 0
3 years ago
Use the svd() function in matlab to compute a, the rank-1 approximation of a. clearly state what a, is, rounded to 4 decimal pla
PolarNik [594]

Using the knowledge in computational language in C code it is possible to write a code that organizes and calculates the value of the matrix of A*A and that is in up to 4 decimal places.

<h3>Writing the code in C is possible:</h3>

<em>A=[1 2 2;3 4 5;6 7 8];</em>

<em>[u ,s ,v] = svd(A);</em>

<em>k = 1;</em>

<em>A1 = u(:,1:k)*s(1:k,1:k)*v(:,1:k)'; %'</em>

<em>RMSE = rms(sqrt(mean((A - A1).^2)))</em>

See more about C code at brainly.com/question/17544466

#SPJ1

3 0
2 years ago
Write Python algebraic expressions corresponding to the following statements: (a) The sum of the first five positive integers (b
lbvjy [14]

Answer:

#part a

#sum of first 5 positive number

Sum=5*(5+1)/2

print("sum of first 5 positive integer is: ",Sum)

#part b

# declare age of all

Sara_age=23

Mark_age=19

Fatima_age=31

ave_age=(Sara_age+Mark_age+Fatima_age)/3

print("average age of Sara,mark and Fatima is: ",ave_age)

#part c

#find number of times

no_of_times=int(403/73)

print(" number of times when 73 goes into 403 is: ",no_of_times)

#part d

#find remainder

rem=403%73

print("when 403 is divided by 73 then remainder  is: ",rem)

#part e

#calculate 2 to pawer 10

two_pow=2**10

print("2 to power  10 is: ",two_pow)

#part f

#declare height of both

sara_h=54

mark_h=57

diff_h=abs(sara_h-mark_h)

print("The absolute difference between height of Sara and Mark is: ",diff_h)

#part g

#find the minimum among three

print("lowest price among the three($34.99,$29.95,$31.50) is: $",min(34.99,29.95,31.50))

Explanation:

In part a, sum of first 5 positive number is calculated as 5*(5+1)/2.In part b, add the age of three and divide it  by 3. In part c, use "/" to find number of times 73 goes into 403.In part d, use "%" to find remainder when 403 is divide by 73.In part e, 2 to the 10th power is calculated as 2**10.In part f, use abs() to find the absolute  difference.In part g, min() function is used to find lowest among the 3 prices.

Output:

sum of first 5 positive integer is:  15.0                                                                                  

average age of Sara,mark and Fatima is:  24.333333333333332                                                                

number of times when 73 goes into 403 is:  5                                                                              

when 403 is divided by 73 then remainder  is:  38                                                                          

2 to power  10 is:  1024                                                                                                  

The absolute difference between height of Sara and Mark is:  3                                                            

lowest price among the three($34.99,$29.95,$31.50) is: $ 29.95

5 0
3 years ago
There are many modes of remote visual communication. Which is the most common mode?
Neko [114]
Videoconferencing, as most people use that. <span />
3 0
3 years ago
Read 2 more answers
___________ is a mass-produced, copyrighted software that meets the needs of a wide variety of users, not just a single user or
GaryK [48]

Answer: Package software

Explanation:

Packaged software is the software that contains the functions and programs that are similar in the nature and features.

It is designed in such a way so that it can attract the customers and user by providing the benefit of the selling of the collection of programs rather than buying individual software programs which costs higher.

Thus, it produced at a large scale as well as bought by numerous users.

4 0
3 years ago
Other questions:
  • Which Command Prompt commands in Windows is used for listing a computer connections to shared resources
    10·1 answer
  • A book of the Law was found in the Temple, which was being repaired, during what year of Josiah's reign.
    15·2 answers
  • An administrator has noticed that GPO containing new update settings has not yet applied to one of the computers on the network.
    5·1 answer
  • How do i show all emails from same sender in outlook
    13·2 answers
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    9·1 answer
  • How many worksheets display in the Excel window when you create a new blank workbook?
    10·2 answers
  • Which of the following statements can be used as evidence that ancient Greek beliefs and art has been influential? Select the th
    9·2 answers
  • Computer privacy typically occurs when which of the following is violated?
    6·1 answer
  • What's the difference between a robot and a machine?
    7·1 answer
  • Michelle has defined a custom object by creating an object literal. She wants to access the properties of the custom object. Mic
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!