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
10

Fix the regular expression used in the rearrange_name function so that it can match middle names, middle initials, as well as do

uble surnames.
Computers and Technology
1 answer:
marysya [2.9K]2 years ago
7 0

Answer:

name = re.search(r"^([\w \.-]), ([\w \.-])$", list_name)

Explanation:

Regular expression is used to simplify the mode in which items in a data structure are for. It uses wildcards as shortcuts.

The python module for regular expression is 're'. The import statement is used to get the module and the search() method of the module is used to get the one matching item while the findall() method is used to get a list of all the matching items in a data structure.

You might be interested in
How many mb are in a gb?
frosja888 [35]

Answer:

1000 megabytes are in a gigabyte

Explanation:

3 0
2 years ago
In a two-sided tag, a(n) ____ tag indicates the content's end.
alexira [117]

Answer:

A closing tag

Explanation:

A tag in HTML is the core building block that marks the presence of an element. If the element has text or another element within it, it is marked using a two-sided tag and in which case, the opening tag indicates the content’s beginning and a closing tag indicates the end of the content

7 0
3 years ago
Read 2 more answers
Could someone please help me with this?
Alexxandr [17]

Answer:

See explanation

Explanation:

Given

if(fish > 400) {

Required

What is the condition checking?

The above statement is an if conditional statement. Analysing the statement in bits:

if -> This represents the beginning of the conditional statement

fish -.> The variable that is being checked

> 400 -> The condition which the variable is being measured by.

So, the statement above is checking if the value of variable fish is greater than 400.

<em>If the condition is true, the instructions associated to that if statement will be executed.</em>

7 0
2 years ago
Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th
Burka [1]

Answer:

// This program is written in C++

// Comments are used for explanatory purpose

// Program starts here

#include<iostream.h>

#include<stdlib.h>

int main()

{

// Declare variables

int num, selectno;

string status;

randomize();

//Generate random number;

num=rand()%10000;

// Prompt to guess a number

cout<<"You have only 10 tries\nTake a guess: ";

int tries = 0;

while (tries != 10)

{

cin>>selectno;

if(selectno == num){

cout<<"You passed at the "<<count+1<<" attempt";

tries = 10;

}

else

{

cout<<"You failed. Take another guess\n You have "<<10 - count + 1 <<" attempts";

}

tries++;

if(tries >= 10)

{

break;

}

}

return 0;

}

8 0
2 years ago
Write the definition of a function typing_speed, that receives two parameters. The first is the number of words that a person ha
Lera25 [3.4K]

Answer:

The definition of function is as follows:

def typing_speed(number_of_words,Time_Interval):

number_of_words>=0  

Time_Interval>0

speed=float(60*number_of_words/Time_Interval)

return speed

Explanation:

Above function is defined step-by-step as follows:

        def typing_speed(number_of_words,Time_Interval):

  • A function named typing speed has two arguments, num_of_words and Time_Interval.

                             number_of_words>=0  

                             Time_Interval>0

  • The variable number_of_words is the number of words entered that a person enters, they must be greater than or equal to 0. Where as Time_Interval is the variable for counting the time span in seconds, it must be greater than 0.

                    speed=float(60*number_of_words/Time_Interval)

                    return speed

  • For determining result firstly the seconds are converted int minutes by multiplying with 60 and number_of_words is divided with Time_Interval in order to get words per minute. The return value will give speed which has data type float.

4 0
2 years ago
Other questions:
  • g Write a program to sort an array of 100,000 random elements using quicksort as follows: Sort the arrays using pivot as the mid
    7·1 answer
  • Hello I am currently working on a multi-sim project. In the file I have already created a timer that goes from 00 - 80 and reset
    11·1 answer
  • HELP 11 pointsw to the person who helps me
    11·2 answers
  • When one user could perform a query to determine which recordings had a track length of four minutes or more, and another user c
    9·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • I will mark brainliest
    9·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    13·1 answer
  • Most of the internal operations in a computer use hexagonal numbering true or false
    13·1 answer
  • Enterprise storage systems typically use fast Fibre Channel or ____ connections and are scalable so more hard drives can be adde
    7·1 answer
  • Because his father _____ his ten-speed bike away to punish him for his failing grades, the boy sulked for two days.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!