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
11111nata11111 [884]
3 years ago
7

In a java class, variables can be present both inside and outside of methods. question 9 options:

Computers and Technology
1 answer:
Tems11 [23]3 years ago
3 0
The correct answer is: True

Explanation:

Consider the following program:
<span>class Main {
int a = 10;
public static void main(String[] args) {
add();
}

private static void add() {
int b = a+20;
System.out.println(b);
}<span>
}


The output of the above program is 30. As you can see the variable a is declared outside the method, whereas variable b is declared inside the method.</span></span>
You might be interested in
A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set
Vanyuwa [196]

Answer:

from functools import reduce

def mean(mylist):

   score = reduce(lambda x,y: x + y, mylist)/ len(mylist)

   return score

def median(mylist):

   sorted(mylist)

   list_len = len(mylist) % 2

   i = round(len(mylist)/2)

   x = len(mylist)//2

   if list_len == 0:

       median = (mylist[x] + mylist[x+1]) / 2  

   else:

       median = mylist[i]

   return median

def mode(mylist):

   unique = set(mylist)

   unique = list(unique)

   collector = [mylist.count(key) for key in unique]

   maxi = max(collector)

   loc = collector.index(maxi)

   return unique[loc]

def main():

   scores = input( 'Enter list of numbers: ').split(",")

   scores = [int(score) for score in scores]

   

   operation = input('Enter operation: ')

   operator = ['mean', 'median', 'mode']

   

   for x in iter(list, 0):

       if operation in operator:

           break

       print("Invalid operation: ")

       operation = input('Enter operation')

   

   index_loc = operator.index(operation)

   

   if index_loc == 0:

       return mean(scores)

   elif index_loc == 1:

       return median(scores)

       #return np.median(scores)  can be used of the defined function

   elif index_loc == 2:

       #return stats.mode(scores)[0]  can be used of the defined function

       return mode(scores)

print( main( ) )

Explanation:

The main python function calls conditionally three statistical functions namely mean, median and mode. It prompts for user input for a list of integer numbers and a function name name to return the corresponding result.

8 0
2 years ago
In which method of encryption is a single encryption key sent to the receiver so both sender and receiver share the same key?
mars1129 [50]

Answer:

B. Symmetric key encryption

Explanation:

Symmetric key encryption is one in which a single encryption key is sent to the receiver so both sender and receiver share the same key. In this type of encryption, the sender uses a particular key to encrypt the data and sends the encrypted data (cipher data) to the receiver and then the receiver uses the same key to decrypt the data.

Public key encryption, or asymmetric encryption uses two keys - a private key and a public key. The public key is know to everyone while the private key is known only to those for whom the message is intended. An application of this type of encryption is in SSL (Secure Sockets Layer) -  a protocol for transmitting data privately on the internet.

Private key encryption is not exactly one of the encryption methods but rather, a private key and a public key are used in encryption.

The best option is therefore <em>symmetric key encryption</em>.

<em>Hope this helps!</em>

7 0
2 years ago
How do you add text to a blank slide layout?
melisa1 [442]

The answer is B; Draw a text box and enter text

By default, we add text to a PowerPoint slide by typing it directly into a placeholder. However, you can use a text box to enter text into a blank slide or outside the placeholders. To add text on a blank slide click on the insert menu and select the Text box option. Click and hold down your mouse button while you drag the mouse. You will then clink inside the text box and starting typing.


6 0
3 years ago
Read 2 more answers
So girls i need advice i got a girliend and shes like awesome nice sweet and i need advice what to say or nice things girls like
Mila [183]
Try getting to know her or ask her about stuff she enjoys doing or hobbies she likes
4 0
2 years ago
Read 2 more answers
What output will the look up formula below produce in relation to the following table?
noname [10]

Answer:

The VLookup checks a value inside a table through matching over the 1st column.

Lookup a value in a table by matching on the first column and the matched value is returned from the table.

Explanation:

The formula for the VLOOKUP is

=VLOOKUP (value to be matched in the first column, table from which the value will be looked for, col_index is the column inside the table from where the value is fetched, [range_lookup] is true for the approximate match, and false for exact match)

5 0
2 years ago
Other questions:
  • Which of the following is where you can save, select a template, change document properties, and close or exit excel?
    8·1 answer
  • Zola is very skilled with Microsoft and Apple, and she knows different methods of programming. This knowledge will help make Zol
    10·2 answers
  • Which key is used in word processors to create indentations?
    13·2 answers
  • IN THE MOVIE BACK TO THE FUTURE 1985 IS 1985 THE PUBLICATION DATE?WHERE CAN I FIND THE MOVIE?
    6·1 answer
  • What is the square root of 1600 and 36 ?​
    6·1 answer
  • Design a hierarchy of classes, where the Media superclass has the artistName and the mediaName as the common attributes. Create
    14·1 answer
  • An ALGORITHM IS?<br> PLEASE HELP
    14·1 answer
  • Including the word OR will make a search less specific.<br> O False<br> O True
    8·2 answers
  • A trace table is used for
    5·2 answers
  • Digital communication and production chapter 17
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!