The document consists of a series of multiple-choice questions related to programming concepts, specifically focusing on data analysis with Pandas, NumPy, SQLite, and JSON handling. Each question presents four options, testing knowledge on topics such as time series analysis, database transactions, and JSON parsing. The questions aim to assess understanding of various programming libraries and their functionalities.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views1 page
3 Python MCQs Exam
The document consists of a series of multiple-choice questions related to programming concepts, specifically focusing on data analysis with Pandas, NumPy, SQLite, and JSON handling. Each question presents four options, testing knowledge on topics such as time series analysis, database transactions, and JSON parsing. The questions aim to assess understanding of various programming libraries and their functionalities.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
24.
How do you perform A) Using the DatetimeIndex and time series-specific
time series analysis methods like resample() and rolling(). , B) By with Pandas? converting the data to a time series object., C) By using the time_series module., D) Time series analysis is not supported by Pandas. 25. How do you create a A) np.zeros(shape), B) np.create_zeros(shape), C) NumPy array of zeros? array.zeros(shape), D) make_array(shape) 26. What is the purpose of A) For scientific and technical computing., B) For the SciPy library? web development., C) For data visualization., D) For machine learning. 27. What is the purpose of A) To estimate values between known data points., interpolation in SciPy? B) To smooth noisy data., C) To reduce the dimensionality of data., D) To perform statistical analysis. 28. How do you create a A) cursor = conn.cursor(), B) cursor = cursor object to execute create_cursor(), C) cursor = execute_sql(), D) cursor SQL commands? = open_cursor() 29. How do you handle A) Using begin_transaction(), commit(), and database transactions rollback() methods., B) Using the transaction() using the sqlite3 function., C) By closing and reopening the database library? connection., D) Transactions are not supported by SQLite. 30. What is the purpose of A) To improve the speed of data retrieval., B) To an index in an SQLite store additional information about the data., C) To database? encrypt the data., D) To compress the database file. 31. How do you close a A) conn.close(), B) close_connection(conn), C) The connection to an SQLite connection is automatically closed when the database? program ends., D) Closing the connection is not necessary. 32. What does JSON stand A) Java Script Object Notation, B) JavaScript for? Oriented Notation, C) JavaScript Object Network, D) Java Script Output Notation 33. How do you parse a A) data = json.loads(json_string), B) data = JSON string into a json.parse(json_string), C) data = dict(json_string), Python dictionary? D) data = json.decode(json_string) 34. How do you convert a A) json_string = json.dumps(data), B) json_string = Python dictionary into a str(data), C) json_string = json.encode(data), D) JSON string? json_string = dict_to_json(data) 35. How do you access a A) Use dot notation or bracket notation (e.g., specific value within a data['key1']['key2']), B) Use the get_value() nested JSON structure? method., C) Use the find() method., D) Use the extract() method. 36. How do you handle A) Use the get() method with a default value., B) missing keys in a JSON Ignore the missing key., C) Raise an error., D) The object? get() method cannot be used for this. 37. How do you handle A) Use a try-except block to catch invalid JSON data? json.JSONDecodeError., B) Ignore invalid data., C) Reformat the JSON data manually., D) There is no way to handle invalid JSON data.