Machine Learning Data Mining Using Python -UBCC5001

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

ISLAMIAH COLLEGE (AUTONOMOUS)

Accredited by NAAC (3rd Cycle) with ‘A++’ Grade


New Town, Vaniyambadi – 653 752

Machine Learning: Data Mining Using Python


III B.Sc., Computer Science & III BCA
(UBCC5001)
Question Bank

Prepared by
Department of Computer Science
&
Department of BCA & Data Science

For the students admitted from Academic year 2022-2024


UNIT – I
PART - A
1. What is the primary purpose of computer algorithms in problem-solving?
(A) To perform hardware maintenance
(B) To provide step-by-step instructions to solve a problem
(C) To design user interfaces
(D) To create graphical designs
2. Which of the following is considered a limitation of computational problem-solving?
(A) Unlimited processing power
(B) Infinite storage capacity
(C) Complexity of problems that exceed practical computation time
(D) Universal compatibility with all programming languages
3. Which component of a computer system is responsible for executing instructions from
programs?
(A) Hard drive (B) RAM
C) Central Processing Unit (CPU) (D) Graphics Processing Unit (GPU)
4. Which of the following is NOT a type of software?
(A) Operating System (B) Database Management System
(C) Motherboard (D) Word Processor
5. In Python, which symbol is used to perform exponentiation?
A) ^ B) ** C) % D) //
6.What is the maximum possible length of an identifier?
(A) 31 characters (B) 63 characters
(C) 79 characters (D) none of the mentioned
7. Is Python case sensitive when dealing with identifiers?
(A) Yes (B) No
(C) Machine dependent (D) None of the mentioned
8. Which of the following is an invalid variable?
(A) my_string_1 (B) 1st_string
(C) foo (D) _
9.Identify the words which best describes Python.
(A) Interpreted (B) reliable
(C) simple (D) All of these
10.What is the output of this code? >>>print(“print ‘’’print hello’’’’’)
(A) print ‘’’print hello’’’print(“print hello”) (B) An error message
(C) ‘print print hello’ (D) print “print print hello”
11. All keywords in Python are in _________
(A) lower case (B) UPPER CASE
(C) Capitalized (D) None of the mentioned
12 What does 3 ^ 4 evaluate to?
(A) 81 (B) 12 (C) 0.75 (D) 7
13.What is the output of this code? >>>float(“123” * (int(input(“Enter a number:”)))
(A) “123123123 (B) “369.0” (C) 123123123.0 (D) 369.0
14.The input() function takes user’s input as a
(A) integer (B) float (C) string (D) list
15.Which of the following results in False?
(A) >>>9=9 or 1==1 (B) >>>3==4 or 7==7
(C) >>>7!=1 or 5==5 (D) >>>4<1 or 1>6
16.Identify the correct arithmetic expression in Python
(A) 11(12+13) (B) (5*6) (7+8)
(C) 4*(3-2) (D) 5***3
17.>>>print (format(56.78901, ‘.3f’))
(A) 56.789 (B) 5.6789 (C) 0.56789 (D) 56789
18.Which of the following results in True?
(A) >>>9=9 and 1==1 (B) >>>3==5 and 7==3
(C) >>>7!=1 and 5==5 (D) >>>4<1 or 1>6
19.Which operator treats operand as a sequence of bits?
(A) Relational (B) Arithmetic (C) Bitwise (D) Logical
20.Which line of code produces an error?
(A) “one” + “2” (B) ‘5’ + 6 (C) 3 + 4 (D) “7” + ‘eight’
PART - B
1. Define computational problem-solving..
2. What are the limits of computational problem-solving?
3. Explain the difference between computer hardware and computer software.
4. What is an algorithm?
5. In Python, what is the purpose of a literal? Provide an example.
6. What is the difference between a variable and an identifier in Python?
7. Define python. Give the features of python.
8. What are the two main types of data types in Python? Give examples of each.
9. Explain how input and output operations are handled in Python.
10. What is the purpose of the // operator in Python?
PART – C
1. Discuss the key components involved in computational problem-solving.
2. Explain the essence of computational complexity on problem-solving.
3. Describe the process of developing and testing an algorithm using a concrete example.
4. Explain the concept of variables and identifiers in Python with examples.
5. Discuss the types of operators in Python and their precedence with examples.
6. What are literals in Python? Provide examples and explain their types.
7. Describe the process of handling input and output in Python with examples.
8. Explain the different data types in Python and provide examples of how they can be used.
9. Discuss the role of expressions in Python and how they can be used to evaluate values.
10. write a python program to solve arithmetic operations.
PART - D
1. Discuss in detail about the process of computational problem solving.
2. Briefly explain the limits of computational problem-solving aspects.
3. Explain in detail about the various operators in python. List their hierarchy.
4. Illustrate a program to display different data types using variables and literal consonants.
5. Enlist the various features in python programming language with an example.
UNIT – II
PART - A
1. Which part of if statement should be indented?
(A) The first statement (B) All the statement
(C) Statements within the if bock (D) None of these
2. Which statement ends the current iteration of the loop and continue with the next one?
(A) break (B) continue (C) skip (D) pass
3.Which of the following is placed after the if condition?
(A) ; (B) . (C) : (D) ,
4.Which statement indicates a NOP?
(A) pass (B) break (C) continue (D) jump
5.What would happen if we replace the break statement in the code with a ‘continue’?
(A) It will stop executing (B) It would run forever
(C) You will have to pass Ctrl + C (D) These would be no change
6.How many lines will be printed by this code?
while False:
Print(“Hello”)
(A) 1 (B) 0 (C) 10 (D) countless
7.The step argument in range() can be zero
(A) True (B) False
8.How many numbers will be printed?
i=5
while i>=10:
print(i)
i=i-1
(A) 5 (B) 6 (C) 4 (D) 0
9.How many lines will be printed?
i=0
while True:
print(i)
i=i-1
if i<=7:
break
(A) 1 (B) 2 (C) 3 (D) 4
10.Which statement is used to terminate the execution of the nearest enclosing loop in which
it appears?
(A) pass (B) break (C) continue (D) jump
11. What will be the output of the following python code?
X=[‘ab’, ‘cd’]
for i in x:
i.upper()
print(x)
(A) [‘ab’, ‘cd’] (B) [‘AB’, ‘CD’]
(C) [None, None] (D) None of the mentioned
12 What will be the output of the following python code?
X=[‘ab’, ‘cd’]
for i in x:
x.append( i.upper())
print(x)
(A)[‘AB’, ‘CD’] (B) [‘ab’, ‘cd’, ‘AB’, ‘CD’]
(C) [‘ab’, ‘cd’] (D) None of the mentioned
13. What will be the output of the following python code?
i=1
while True:
if i%3==0
break
print(i)
i+=1
(A)1 2 (B) 1 2 3 (C) error (D) None of the mentioned
14. What will be the output of the following python code?
True=False
While True:
Print(True)
Break
(A)True (B) False (C) None (D) none of the mentioned
15. Can we write if/else into one line python?
(A) Yes (B) No (C) if/else not used in python (D) None of the above
16.What keyword would you use to add an alternative condition to an if statement?
(A) else if (B) elseif (C) elif (D) None of the above
17. What is a Boolean flag used for in programming?
(A) To store numerical values (B) To indicate a true or false condition
(C) To define data types (D) To create user interfaces
18. How do you add an element to the end of a list in Python?
(A) list.append(element) (B) list.add(element)
(C) list.insert(element) (D) list.extend(element)
19. Which Python method is used to concatenate two strings?
(A) string.concat() (B) string.add()
(C) string.join() (D) string + string
20. Which of the following is a correct way to create a list with numbers from 0 to 9 using
range in Python?
(A) numbers = range(10) (B) numbers = list(range(10))
(C) numbers = range(0, 10) (D) All of the above
PART – B
1. What is the purpose of pass statement?
2. Write the syntax of if and if-else statement.
3. Illustrate the flow chart of if-elif- else statements
4. Write the syntax and usage of for loop
5. Write a program to find larger of two numbers.
6. Present the flow of execution for a while statement.
7. Define python list.
8. Define dictionary.
9. Mention the list operations.
10. Describe any 4 methods used on a string.
PART – C
1. Explain Boolean expressions in Python.
2. Describe how the if statement works in Python and discuss the importance of indentation.
3. Discuss multi-way selection in Python. How can you use if, elif, and else statements to
handle multiple conditions?
4. Explain the while loop in Python and how it differs from for loops.
5. Describe the difference between definite and indefinite loops with suitable examples.
6. Explain how to manipulate strings in Python. Include examples of common operations
such as slicing, concatenation, and searching.
7. How lists are manipulated in Python. Discuss common operations such as appending,
removing, and slicing.
8. How are dictionaries used in Python? Discuss key operations such as adding, accessing,
and deleting key-value pairs.
9. Explain the concept of ranges in Python and how they are used in loops with suitable
examples of using range().
10. Write a program to determine whether a person is eligible to vote or not.

PART – D
1. Explain the various selection/conditional branching statements supported by python.
2. Explain break and continue statement with the help of for loop in an example.
3. Illustrate the syntax and flowchart of the following looping statements in python (i) for
loop (ii) while loop.
4. Discuss in detail about string, list and dictionary operations in python with suitable
examples.
5. Write a python program to print diamond pattern using for loop.
UNIT – III
PART – A
1. What is the main goal of machine learning?
(A) To program computers without human intervention
(B) To enable computers to learn from data and improve performance over time
(C) To create AI systems that can outperform humans
(D) To develop complex algorithms for data processing
2. Which type of machine learning algorithm is trained on labelled data to make predictions
on new, unseen data?
(A) Unsupervised Learning (B) Reinforcement Learning
(C) Semi-supervised Learning (D) Supervised Learning
3. What is the process of preparing raw data by cleaning, transforming, and normalizing it for
machine learning?
(A) Data Preprocessing (B) Data Engineering
(C) Data Wrangling (D) Data Augmentation
4. In unsupervised learning, the primary task is:
(A) Predicting an output value based on input data
(B) Discovering patterns or structures in data
(C) Maximizing cumulative rewards through interactions with the environment
(D) Learning from expert demonstrations
5. Which machine learning algorithm is inspired by the behavior of neurons in the human
brain?
(A) Decision Trees (B) k-Nearest Neighbors (k-NN)
(C) Support Vector Machines (SVM) (D) Artificial Neural Networks (ANN)
4. Which type of machine learning involves training a model with labeled data?
(A) Unsupervised Learning (B) Reinforcement Learning
(C) Supervised Learning (D) Semi-Supervised Learning
5. What type of machine learning is used when the model is trained without labeled data?
(A) Supervised Learning (B) Unsupervised Learning
(C) Reinforcement Learning (D) Transfer Learning
6. In supervised learning, what are the labels in the training data used for?
(A) To determine the model's accuracy
(B) To help the model learn and make predictions
(C) To clean the data
(D) To improve the data collection process
7. Which of the following is an example of a supervised learning task?
(A) Customer segmentation (B) Spam email classification
(C) Market basket analysis (D) Anomaly detection
8. Which machine learning technique involves clustering data into groups based on
similarities?
(A) Classification (B) Regression (C) Clustering (D) Reinforcement
9. What is the purpose of feature selection in machine learning?
(A) To increase the number of features in the dataset
(B) To improve the accuracy of the model by selecting the most relevant features
(C) To visualize data features
(D) To generate new features from existing ones
10. Which tool is commonly used for data preprocessing in machine learning?
(A) TensorFlow (B) Keras (C) Pandas (D) PyTorch
11. What is a common application of reinforcement learning?
(A) Image classification (B) Predicting stock prices
(C) Game playing (e.g., chess, Go) (D) Customer segmentation
12. Which metric is commonly used to evaluate classification models?
(A) Mean Squared Error (B) Accuracy
(C) R-squared (D) Confusion Matrix
13. What does the term "overfitting" refer to in machine learning?
(A) The model performs well on the training data but poorly on unseen data
(B) The model has too few parameters
(C) The model does not learn from the training data
(D) The model uses too little data
14. Which of the following is a popular library for building neural networks?
(A) NumPy (B) Matplotlib (C) Keras (D) Scikit-learn
15. In unsupervised learning, what does dimensionality reduction aim to achieve?
(A) To increase the number of features in the dataset
(B) To reduce the number of features while preserving important information
(C) To convert categorical data into numerical data
(D) To balance the dataset
16. Which algorithm is commonly used for linear regression tasks?
(A) k-Nearest Neighbors (B) Support Vector Machine
(C) Gradient Descent (D) Random Forest
17. What is the purpose of a validation set in machine learning?
(A) To train the model
(B) To evaluate the performance of the model during training and tune
hyperparameters
(C) To test the model after training
(D) To collect additional data
18. Which type of machine learning model would you use to predict a continuous value?
(A) Classification Model (B) Clustering Model
(C) Regression Model (D) Anomaly Detection Model
20. Which tool provides a comprehensive environment for machine learning, including data
preprocessing, model training, and deployment?
(A) TensorFlow (B) Jupyter Notebook (C) PyTorch (D) Scikit-learn
PART – B
1. Define Machine Learning.
2. What is the primary purpose of machine learning?
3. Difference between supervised and unsupervised learning.
4. What is the difference between classification and regression in supervised learning?
5. Give an example of a machine learning application in healthcare.
6. What is data preprocessing and why is it important?
7. Define Support Vector Machine.
8. What is KNN?
9. List out the types of machine learning algorithms.
10. Define linear and logistic regression with an example.
11. Define Random Forest Regression.
12. Write a short note on: Decision Tree with an example.
13. Define Reinforcement Learning with an example.
14. List any five tools used for Machine Learning.
15. What is the purpose Machine Learning and list the applications of Machine Learning?

PART – C
1. Examine in detail about machine learning process with an example
2. Differentiate between Training data and Testing Data
3. Explain various learning techniques involved in supervised learning?
4. Explain various learning techniques involved in unsupervised learning?
5. Difference between linear regression and logistic regression.
6. Discuss in detail about classification in supervised learning and list it types.
7. Write a short note on:
(a) Support Vector Machine
(b) Random Forest Regression
8. Explain in detail about KNN and Decision Tree with suitable example.
9. How machine learning used in business, agriculture ,fraud detection, image processing,
and medical fields with few examples.
10. Briefly explain the tools used for machine learning with suitable examples for each tool.
PART – D
1. What is machine learning? Discuss about learning and machine learning. Choose various
types of machine learning.
2. Demonstrate the supervised learning structure.
3. Explain briefly about unsupervised learning structure?
4. Differentiate between Supervised, Unsupervised and Reinforcement Learning.
5. Explain the software tools used in machine learning and describe each tool in details.

You might also like