admin Oct, Wed, 2024 EXAM PYTHON FULL STACK 123456789101112131415161718192021222324252627282930313233343536373839404142434445 Exam Instructions: Total Number of Questions: 45 You will be required to answer a total of 45 multiple-choice questions. Time Limit: 15 minutes for the entire exam Once the time is up, the exam will automatically submit. Passing Criteria: A minimum score of 50% is required to pass the exam Multiple Attempts: You are allowed to take the exam multiple times. Only your highest score will be considered for certification. Additional Instructions: The exam timer cannot be paused once it begins. Good luck, and feel free to retake the exam to improve your score! PYTHON FULL STACK Test your PYTHON FULL STACK skills with a challenging exam designed to evaluate your knowledge in programming, data structures, and algorithms The certificate will be generated based on the information you provide in the form, so please ensure that all details are entered correctly. NameEmailPhone NumberUniversityCollegeDegreeDepartmentPass Out YearPass Out Year2014201520162017201820192020202120222023202420252026202720282029 1 / 45 1) How can you find the length of a list? A) len(list) B) len(list) C) count(list) D) list.length() 2 / 45 2) How do you handle exceptions in Python? A) if/else B) for/else C) try/except D) try/except 3 / 45 3) How can you create a shallow copy of a list? A) my_list.copy() B) Both 1 and 2 C) my_list[:] D) Both 1 and 2 4 / 45 4) What is the output of print(“Hello” + ” World”)? A) HelloWorld B) Hello World C) Error D) Hello World 5 / 45 5) What is the use of zip() function? A) Combines multiple iterables B) Flattens a list C) Combines multiple iterables D) Splits a list 6 / 45 6) What is the output of print(“Hello World!”.replace(“World”, “Python”))? A) Hello Python! B) Hello Python! C) Error D) Hello World! 7 / 45 7) What does continue do in a loop? A) Breaks the loop B) Exits the loop C) Skips to the next iteration D) Skips to the next iteration 8 / 45 8) What does the replace() method do? A) Replaces a substring B) Joins two strings C) Splits a string D) Replaces a substring 9 / 45 9) What is the purpose of the self parameter in class methods? A) Refers to the instance of the class B) Refers to the instance of the class C) Refers to the class itself D) Refers to the parent class 10 / 45 10) Which of the following statements is true about Python lists? A) They can contain duplicate elements B) Both A and C C) They are immutable D) They are ordered 11 / 45 11) What does len(‘Hello’) return? A) 4 B) 5 C) 5 D) 6 12 / 45 12) What is the purpose of the return statement in a function? A) Repeats the function B) Stops the program C) Exits the function and returns a value D) Exits the function and returns a value 13 / 45 13) How do you get the values from a dictionary? A) my_dict.values() B) my_dict.values() C) my_dict.all_values() D) my_dict.get_values() 14 / 45 14) What is the output of print(2 ** 3)? A) 8 B) 8 C) 9 D) 6 15 / 45 15) What does the len() function do? A) Returns the length of an object B) Converts an object to a string C) Returns the length of an object D) Creates a new list 16 / 45 16) What is the purpose of the finally block? A) Only executes if an error occurs B) Executes after try and except C) Both 1 and 2 D) Executes after try and except 17 / 45 17) How do you add an element to a set? A) my_set.insert(element) B) my_set.append(element) C) my_set.add(element) D) my_set.add(element) 18 / 45 18) How do you initialize a dictionary in Python? A) my_dict = () B) my_dict = {} C) my_dict = [] D) my_dict = {} 19 / 45 19) What will be the output of print(“Python” * 2)? A) PythonPython B) Python Python C) PythonPython D) Error 20 / 45 20) How do you comment a single line in Python? A) # Comment B) // Comment C) # Comment D) /* Comment */ 21 / 45 21) What is the output of print(“1234”.isdigit())? A) Error B) True C) False D) True 22 / 45 22) What does break do in a loop? A) Exits the loop B) Exits the loop C) Skips the iteration D) Breaks the function 23 / 45 23) How do you find the maximum value in a list? A) my_list.max() B) my_list.maximum() C) max(my_list) D) max(my_list) 24 / 45 24) How do you remove duplicates from a list? A) list(set(my_list)) B) set(my_list) C) Both 1 and 2 D) my_list.remove_duplicates() 25 / 45 25) How do you get the keys of a dictionary? A) my_dict.all_keys() B) my_dict.keys() C) my_dict.keys() D) my_dict.get_keys() 26 / 45 26) What is the output of print(0 == False)? A) True B) False C) Error D) True 27 / 45 27) How do you create a virtual environment in Python? A) env.create() B) python -m venv env C) python -m venv env D) create env 28 / 45 28) What is the output of print(2 or 0)? A) 0 B) False C) 2 D) 2 29 / 45 29) How do you raise an exception? A) catch Exception("Error") B) raise Exception("Error") C) throw Exception("Error") D) raise Exception("Error") 30 / 45 30) What is the default port for a Flask application? A) 5000 B) 8080 C) 8000 D) 5000 31 / 45 31) What is the output of print({1, 2, 3} – {2})? A) {2} B) {1, 3} C) {1, 2, 3} D) {1, 3} 32 / 45 32) How do you check if a key exists in a dictionary? A) key in my_dict B) my_dict.contains(key) C) my_dict.has_key(key) D) key in my_dict 33 / 45 33) How can you get the last item from a list? A) list.last() B) list[-1] C) list.get(-1) D) list[-1] 34 / 45 34) How do you connect to a PostgreSQL database in Python? A) mysql.connect() B) psycopg2.connect() C) psycopg2.connect() D) connect.postgres() 35 / 45 35) What is the output of print(2 * “abc”)? A) abcabc B) Error C) abcabcabc D) abcabc 36 / 45 36) How do you convert a string to lowercase? A) lower("Hello") B) "Hello".lower() C) "Hello".lower() D) "Hello".toLowerCase() 37 / 45 37) How do you access a value in a dictionary? A) my_dict.get(key) B) my_dict[key] C) Both D) Both 38 / 45 38) What is the output of print(“Hello”.upper())? A) HELLO B) Hello C) HELLO D) Error 39 / 45 39) Which of the following is a valid variable name? A) 1variable B) variable-name C) variable_name D) variable_name 40 / 45 40) How do you remove an element from a list? A) my_list.remove(element) B) my_list.delete(element) C) my_list.pop(element) D) my_list.remove(element) 41 / 45 41) How can you convert a string to an integer? A) str(my_string) B) my_string.to_int() C) int(my_string) D) int(my_string) 42 / 45 42) How do you remove a key from a dictionary? A) my_dict.remove(key) B) my_dict.pop(key) C) Both 1 and 3 D) del my_dict[key] 43 / 45 43) What does join() do? A) Splits a string B) Replaces a substring C) Joins elements of an iterable D) Joins elements of an iterable 44 / 45 44) What is the output of print([1, 2, 3].pop())? A) 1 B) 3 C) 2 D) 3 45 / 45 45) What is the output of print([1, 2, 3] + [4, 5])? A) [1, 2, 3] B) Error C) [1, 2, 3, 4, 5] D) [1, 2, 3, 4, 5] Your score is LinkedIn Facebook Twitter VKontakte 0% ExamWEB DEVELOPMENT EXAM...Read MoreREACT JS PROGRAMMING EXAM...Read MorePYTHON FULL STACK...Read MorePYTHON EXAMS ...Read MoreMYSQL...Read MoreMACHINE LEARNING...Read MoreJAVASCRIPT PROGRAMMING EXAM...Read MoreJAVA SPRING BOOT...Read MoreJAVA PROGRAMMING EXAM...Read MoreJAVA FULL STACK...Read MoreHTML PROGRAMMING EXAM...Read MoreDEEP LEARNING...Read MoreDATA SCIENCE...Read MoreCSS PROGRAMMING EXAM...Read MoreANGULAR JS PROGRAMMING EXAM...Read More 13Share on WhatsApp6Share on LinkedIn4Share on YouTube9Share on Facebook Comments 0