PYTHON QUIZ 4 1 Created on May 24, 2020 By Sirjana GhimireAcharya PYTHON QUIZ 4 1 / 10 1. What is the output of the following code?for x in range(0.5, 5.5, 0.5):print(x) [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5] [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5] The Program executed with errors 2 / 10 2. What is the result of print(type([]) is list) True False 3 / 10 3. What is the data type of print(type(0xFF)) number hexint hexint int 4 / 10 4. What is the data type of the followingaTuple = (1, 'Jhon', 1+3j)print(type(aTuple[2:3])) list complex tuple 5 / 10 5. What is a correct syntax to return the first character in a string? x = "Hello"[0] x = "Hello".sub(0, 1) x = sub("Hello", 0, 1) 6 / 10 6. Which method can be used to remove any whitespace from both the beginning and the end of a string? len() strip() trim() ptrim() 7 / 10 7. Which method can be used to return a string in upper case letters? upperCase() toUpperCase() upper() uppercase() 8 / 10 8. Which method can be used to replace parts of a string? switch() repl() replace() replaceString() 9 / 10 9. Which operator can be used to compare two values? == >< <> = 10 / 10 10. Which of these collections defines a LIST? {"apple", "banana", "cherry"} {"name": "apple", "color": "green"} ("apple", "banana", "cherry") ["apple", "banana", "cherry"] Your score is The average score is 0% LinkedIn Facebook Twitter 0% Restart quiz