The Python Data Science problem Rollup __python

Source: Internet
Author: User

Python has become increasingly popular among data science enthusiasts, and it is important that it brings a complete system to the universal programming language. With Python you can not only transform operational data, but also create powerful piping commands and machine learning processes in a single system.

In Analytics Vidhya, we all like to use Python, and most people take it as the preferred tool for machine learning. In addition, if you want to learn more, it's clear that Python has a greater advantage in this field than any other programming language, and it has formed a mature ecosystem.

If you're learning about Python for data science, this test can be used to help assess your Python level in this area. The test was conducted as part of the DataFest2017, with nearly 1300 people taking part in the tests, more than 300 of whom took part in the test.

Here are the scores of the people who took the test:

You can get the final score on this site: https://datahack.analyticsvidhya.com/contest/avdatafest-powertool-python-for-data-science/lb

Some statistical results are listed below:

Average score: 14.16

Median Number: 15

Number of days: 0

Questions & Answers

Question 1 description;

Surely you have seen "How I Met Your Mother" this entertainment, when they play the game, once someone said "But,um", then everyone must have a drink. Now I want to change the game and use your technology to play the game. The goal of the game is that you need to write a code to determine how many drinks a person has to drink throughout the game.

The following is a sample field.

Hint: Python's regular expression library re has been imported

1 Which of the following code can complete this task.

Answer (C)

You need to find all the uppercase and lowercase letters "but" so C is correct

Question 2 Description

Given the following string:

To extract the domain name of an email address from the string above (for example, "AAA", "BBB",...), you write the following code:

2 The above code in the "___" place should be filled out what is the number of it.

Hint: Python's regular expression library re has been imported

A) 0

B) 1

C) 2

D) 3

Answer (C)

Refer to Regular expression syntax

Question 3 Description

Your friend has a hypothesis-"all those who end up with the letter" Y "(for example, Hollie) are smart people. Please note: This name should end with "Y", not end with the letter "Y". Now, you need to take these data out of your school web site based on this assumption. Here is the data that has been collected

You wrote the following code to list all the names of the people who met this assumption:

3 in regular expressions, how should "pattern" be written.

Answer (B)

You need to find all the strings that end with "I" or "ie", so B is correct.

Question 4 description

Give the following two lists:

Now you need to combine the elements of the two list into a new list, as follows

4 you will choose which of the following options.

Answer (B)

5 Suppose you've built a machine learning model, but you don't want to use it now, and then use it later. Which of the following commands satisfies this requirement.

Tip: library pickle has been imported as PKL

Answer (C)

Question 6 Description

Converts the following string to a date value

6 in order to achieve this goal, the expression "date_format" should be filled out.

Answer (D)

I have established a simple neural network for image recognition problems. Now, I want to test whether the weights and deviations are correctly set for the hidden layer. To achieve this, I need a unit matrix as input. Here's my unit matrix:

7 How to generate such a unit matrix in Python.

Tip: library numpy has been imported as NP

Answer (A)

Option B should be np.identity () and the syntax for option C is incorrect.

8 to detect whether two arrays occupy the same space, what should be done.

For example, here are two arrays

When you change the value of the first array, the second array changes as well. As shown below, the first five numbers of an array are changed to 0, and the output of the final two arrays is as follows:

A check the memory of two arrays, if they match each other is the same

B look at the output of "np.array_equal (E, f)" and if the result is "True" then they are the same

C) outputs the values of "E.flags" and "F.flags", and if one of them is "False", the two arrays are allocated the same space

D) None of the above is right

Answer (C)

Question 9 Description

Suppose you want to add the training array (train_set) and the test array (test_set) to the result array (resulting_set) to do the data processing, as follows;

9 How do you combine these two arrays.

Answer (C)

Both A and B are placed horizontally, but the result should be vertically positioned.

Question 10 Description

Let's say you're adjusting the random number distribution parameters of the iris DataSet.

10 for "random_state (Seed value)", which of the following is the best value.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.