Coding Pyhton Coding Test 0% Time Limit 10 minutes Maximum Allowed Time Is over Your Paper Successfully Sent. coding Python 1 / 50 What is the result of "apple".upper()? APPLE Apple apple 2 / 50 How do you delete a key-value pair in a dictionary? del dict[key] pop dict[key] remove dict[key] 3 / 50 What does isinstance("Python", str) return? False True None 4 / 50 What is the correct way to create a list in Python? [1, 2, 3] {1, 2, 3} (1, 2, 3) 5 / 50 What is the result of "hello".title()? Hello HELLO Hello 6 / 50 What does break do in a loop? Repeats the loop Skips one iteration Ends the loop 7 / 50 What is the default value of end in a print() function? "." "," "n" 8 / 50 How do you add an element to a list? list.add() list.append() list.appendlist() 9 / 50 How do you split a string into a list? string.partition() split(string) string.split() 10 / 50 How do you check if a string starts with a specific character? startswith("char") string.startswith("char") "char" in string 11 / 50 How do you remove the last item from a list? list.pop() list.delete() list.remove() 12 / 50 What is the result of 10 // 3? 3 3.33 3 13 / 50 How do you write a multi-line string in Python? " " ' ' """ """ 14 / 50 What is the result of [1, 2, 3] + [4, 5]? [1, 2, 3] [1, 2, 3, 4, 5] [5, 4, 3, 2, 1] 15 / 50 How do you raise a number to a power? pow(num, power) num**power num^power 16 / 50 What is the result of "Python".startswith("Py")? True None False 17 / 50 What does is compare in Python? Object identities Memory usage Values only 18 / 50 What is the output of len((1, 2, 3))? 3 4 2 19 / 50 How do you convert a string to an integer? convert(string) str(int) int(string) 20 / 50 What is the result of list(range(3, 6))? [1, 2, 3, 4, 5, 6] [3, 6] [3, 4, 5] 21 / 50 What is the result of "abc".upper()? abc ABC Abc 22 / 50 Which method adds an element to the end of a list? push() append() add() 23 / 50 What is the correct file extension for Python files? .py .pt .pyth 24 / 50 How do you sort a list in descending order? list.desc() list.reverse() list.sort(reverse=True) 25 / 50 What is the result of 5 >= 5? None False True 26 / 50 What does sorted([3, 1, 2]) return? Error [3, 1, 2] [1, 2, 3] 27 / 50 How do you round 2.675 to two decimal places? 2.68 round(2.675, 2) round() 28 / 50 Which function is used to get input from the user? read() input() scan() 29 / 50 What does int("10") return? A string A float An integer 30 / 50 How do you define a function in Python? function func() def func() def func(): 31 / 50 What is the output of 2 * '3' in Python? 33 Error 6 32 / 50 What is the output of bool(0)? False True 0 33 / 50 What is the output of [1, 2, 3][1]? 1 3 2 34 / 50 What is the output of "abc".capitalize()? ABC abc Abc 35 / 50 How do you convert a string to lowercase? lower(str) str.lowercase() str.lower() 36 / 50 What is the result of "Python"[::-1]? Python nohtyP Error 37 / 50 Which method is used to remove an item from a list? erase() delete() remove() 38 / 50 How do you get the remainder of a division? // divmod() % 39 / 50 How do you create an empty dictionary? () {} [] 40 / 50 What is the output of 10 == 10? Error False True 41 / 50 What is the result of 10 // 3? 3 10 3.33 42 / 50 How do you round a number to two decimal places? approx(num, 2) num.round(2) round(num, 2) 43 / 50 What is the output of bool([])? False None True 44 / 50 How do you check if a key exists in a dictionary? dict.contains(key) key in dict.keys() key in dict 45 / 50 How do you find the index of an element in a list? index() find() locate() 46 / 50 What is the output of bool(None)? True Error False 47 / 50 How do you access the value of a key in a dictionary? dict.value(key) dict[key] key.dict() 48 / 50 What will range(5) produce? A single number A list of letters A sequence of numbers 49 / 50 What does type([]) return? <class 'dict'> <class 'tuple'> <class 'list'> 50 / 50 What is the default return value of a function in Python? 0 Error None Your score is LinkedIn Facebook VKontakte 0% Exit