answer.
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
vagabundo [1.1K]
2 years ago
5

#Write a function called "in_parentheses" that accepts a

Computers and Technology
1 answer:
zimovet [89]2 years ago
8 0

Answer:

import regex as re

def in_parentheses(a_string):

   regeX = re.compile(".*?\((.*?)\)")

   result = re.findall(regeX, a_string)

   return str(result).replace("[","").replace("]","")

print("test 1: "+in_parentheses("Open ( only"))

print("test 2: "+in_parentheses("This is a sentence (words!)."))

You might be interested in
your company decides to implement a RAID-5 array on several file servers. Which feature is provided by this deployment
Novay_Z [31]

Answer:

High availability

Explanation:

RAID-5 array is defined as a redundant array for independent disk configuration which makes use of the disk striping with the parity. It consists of a minimum three disk drives and it uses the data striping and the parity data to provide the redundancy.

RAID 5 is a powerful tool to ensure integrity of the data. It provides both performance as well as security to the data.

In the context, "high availability" is the feature that is provided by the deployment of RAID 5 array on the several file services.

4 0
1 year ago
3.14 LAB: Simple statistics for Python
Ad libitum [116K]

Answer:

Following are the correct python code to this question:

n1 = float(input('Input first number: '))#input first number  

n2 = float(input('Input second number: '))#input second number  

n3 = float(input('Input third number: '))#input third number  

n4 = float(input('Input fourth number: '))#input fourth number  

average = (n1+n2+n3+n4)/4 #calculate input number average

product = n1*n2*n3*n4 # calculate input number product

print('product: {:.0f}  average: {:.0f}'.format(round(product),round(average))) #print product and average using round function

print('product: {:.3f}  average: {:.3f}'.format(product,average)) #print product and average value

Output:

Please find the attachment.

Explanation:

The description of the above python code can be defined as follows:

  • In the above python program four variable "n1, n2, n3, and n4" is defined, in which we take input from the user end, and in these user inputs we use the float method, that converts all the input value in to float value.
  • In the next step, two variable average and product are defined, that calculate all input numbers product, average, and hold value in its variable.
  • In the last line, the print method is used, which prints its variable value by using a round and format method.

8 0
2 years ago
Donna often travels around the world. When she travels, she needs to access her emails from different locations. However, to kee
juin [17]

The answer is B: Yahoo! mail

Donna is able to install Yahoo! mail as an app on her portable devices like phones and tablets and be able to organize her Google mails, Outlook, and yahoo accounts. The beauty of it is that you are able to sign in with any account (non-Yahoo emails). anywhere and at any time. It also provides 1000 GB of free secure cloud storage.



6 0
2 years ago
Read 2 more answers
What are two characteristics of a scalable network? (choose two.)?
vampirchik [111]

The two characteristics of scalable network are such that it can easily grow in size without causing any impact to the current users. This means, increase in network capacity and technical capability will not have any detrimental effects to the users.  Another characteristic of this network is that it can work perfectly with modular devices provided they   support expansion process.


7 0
1 year ago
Consider the following relation:CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)Assume that a car may be sold
GalinKa [24]

Answer:

The answer to this question can be given as:

Normalization:

Normalization usually includes the division of a table into two or more tables as well as defining a relation between the table. It is also used to check the quality of the database design. In the normalization, we use three-level that are 1NF, 2NF, 3NF.

First Normal Form (1NF):

In the 1NF each table contains unique data. for example employee id.  

Second Normal Form (2NF):

In the 2NF form, every field in a table that is not a determiner of another field's contents must itself be a component of the table's other fields.

Third Normal Form (3NF):

In the 3NF form, no duplication of information is allowed.

Explanation:

The explanation of the question can be given as:

  • Since all attribute values are single atomic, the given relation CAR_SALE is in 1NF.  
  • Salesperson# → commission% …Given  Thus, it is not completely dependent on the primary key {Car#, Salesperson#}. Hence, it is not in 2 NF.                                                                                                        

The 2 NF decomposition:

        CAR_SALE_1(Car#, Salesperson#, Date_sold, Discount_amt)

         CAR_SALE_2(Salesperson#, Commission%)

  • The relationship in question is not in 3NF because the nature of a transitive dependence occurs
  • Discount_amt → Date_sold → (Car#, Salesperson#) . Thus, Date_sold is neither the key itself nor the Discount amt sub-set is a prime attribute.  

The 3 NF decomposition :

        CAR_SALES_1A(Car#, Salesperson#, Date_sold)

        CAR_SALES_1B(Date_sold, Discount_amt)

        CAR_SALE_3(Salesperson#, Commission%)

5 0
1 year ago
Other questions:
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    12·2 answers
  • A major weakness of a lot of file processing systems is that ____.
    10·1 answer
  • Which item is essential to know before sketching a navigation menu flowchart? template specifics, such as horizontal or vertical
    12·1 answer
  • What are the advantages and disadvantages of using a very large memory cell size, say, W = 64 instead of the standard size W = 8
    15·1 answer
  • Your company wants to conduct an exploratory study to gain new insights into some product changes you are considering. Which typ
    15·1 answer
  • A ____ is a software implementation of a computer that executes programs as if it were a real physical computer within the physi
    15·1 answer
  • If the input is negative, make numItemsPointer be null. Otherwise, make numItemsPointer point to numItems and multiply the value
    9·1 answer
  • 12) Suppose you wanted a subroutine to return to an address that was 3 bytes higher in memory than the return address currently
    11·1 answer
  • Modify the closest pair of points algorithm so that the separating line L now separates the first n/4 points (sorted according t
    14·1 answer
  • Are bpos safe for organisations ? State your views on it
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!