Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 MCQs Introduction; Variables, Expressions and Statements

ECE181 — Introduction To Python 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 need for a programming language Easy

    What is the primary purpose of a programming language?

  2. Question 2 of 60 introduction to python as a programming language Easy

    Python is best described as which type of programming language?

  3. Question 3 of 60 introduction to python as a programming language Easy

    Who is credited with creating the Python programming language?

  4. Question 4 of 60 programming errors and debugging Easy

    Which type of error occurs when Python code violates the rules of the language, such as a missing colon?

  5. Question 5 of 60 programming errors and debugging Easy

    What is the process of finding and fixing errors in a program called?

  6. Question 6 of 60 identifiers Easy

    Which of the following is a valid Python identifier?

  7. Question 7 of 60 identifiers Easy

    Which statement about Python identifiers is true?

  8. Question 8 of 60 variables Easy

    What is a variable in Python?

  9. Question 9 of 60 assignment statements Easy

    What does the statement x = 5 do in Python?

  10. Question 10 of 60 expressions Easy

    Which of the following is an example of an expression in Python?

  11. Question 11 of 60 named constant Easy

    By convention, how are named constants usually written in Python?

  12. Question 12 of 60 simultaneous assignment Easy

    What will be the values of a and b after a, b = 1, 2?

  13. Question 13 of 60 simultaneous assignment Easy

    Which single statement correctly swaps the values of x and y in Python?

  14. Question 14 of 60 boolean types Easy

    Which of the following are the two Boolean values in Python?

  15. Question 15 of 60 numeric data types Easy

    Which numeric data type represents whole numbers in Python?

  16. Question 16 of 60 numeric data types Easy

    What is the data type of the value 3.14 in Python?

  17. Question 17 of 60 operators Easy

    Which operator is used for exponentiation in Python?

  18. Question 18 of 60 operator precedence and associativity Easy

    What is the result of the expression 2 + 3 * 4 in Python?

  19. Question 19 of 60 augmented assignment operators Easy

    What does the statement x += 3 mean in Python?

  20. Question 20 of 60 type conversion and rounding Easy

    What does the function int(4.9) return in Python?

  21. Question 21 of 60 numeric data types Medium

    What is the data type of the result of the expression 7 / 2 in Python 3?

  22. Question 22 of 60 operators Medium

    What is the output of 17 % 5 in Python?

  23. Question 23 of 60 operator precedence and associativity Medium

    What is the value of the expression 2 + 3 * 4 ** 2?

  24. Question 24 of 60 operator precedence and associativity Medium

    What does the expression 2 ** 3 ** 2 evaluate to in Python?

  25. Question 25 of 60 augmented assignment operators Medium

    After the code x = 10 followed by x //= 3, what is the value of x?

  26. Question 26 of 60 simultaneous assignment Medium

    After executing a, b = 5, 10 and then a, b = b, a, what are the values of a and b?

  27. Question 27 of 60 type conversion and rounding Medium

    What is the output of int(9.99) in Python?

  28. Question 28 of 60 type conversion and rounding Medium

    What does round(2.5) return in Python 3?

  29. Question 29 of 60 boolean types Medium

    What is the result of the expression True + True + False in Python?

  30. Question 30 of 60 boolean types Medium

    What is the output of bool(0.0) or bool("")?

  31. Question 31 of 60 identifiers Medium

    Which of the following is a valid Python identifier?

  32. Question 32 of 60 identifiers Medium

    Why does the statement class = 5 raise an error in Python?

  33. Question 33 of 60 programming errors and debugging Medium

    A program runs without crashing but produces an incorrect average. What type of error is this?

  34. Question 34 of 60 programming errors and debugging Medium

    Dividing by zero in x = 5 / 0 produces which kind of error?

  35. Question 35 of 60 expressions Medium

    What is the value of the expression 10 - 4 - 2 in Python?

  36. Question 36 of 60 assignment statements Medium

    What happens when the following runs: x = 5 then x = x + "3"?

  37. Question 37 of 60 named constant Medium

    By convention, how should a named constant like the value of Pi be written in Python?

  38. Question 38 of 60 variables Medium

    After a = 3 and b = a and then a = 7, what is the value of b?

  39. Question 39 of 60 need for a programming language Medium

    Why do we use high-level programming languages instead of machine code directly?

  40. Question 40 of 60 introduction to python as a programming language Medium

    Which statement best describes Python as a programming language?

  41. Question 41 of 60 operator precedence and associativity Hard

    What is the result of evaluating 2 ** 3 ** 2 in Python?

  42. Question 42 of 60 numeric data types Hard

    What does 0.1 + 0.2 == 0.3 evaluate to in Python, and why?

  43. Question 43 of 60 type conversion and rounding Hard

    What is the output of round(2.5) + round(3.5)?

  44. Question 44 of 60 simultaneous assignment Hard

    After executing a, b = 1, 2 then a, b = b, a + b, what are the values of a and b?

  45. Question 45 of 60 boolean types Hard

    What is the result of True + True + False in Python?

  46. Question 46 of 60 operators Hard

    What is the value of -7 // 2 in Python?

  47. Question 47 of 60 operators Hard

    What does -7 % 3 evaluate to in Python?

  48. Question 48 of 60 expressions Hard

    What is the output of 2 + 3 * 4 ** 2 // 5 - 1?

  49. Question 49 of 60 augmented assignment operators Hard

    Given x = 5, what is the value of x after x //= 2; x **= 2; x -= 1?

  50. Question 50 of 60 identifiers Hard

    Which of the following is a valid Python identifier?

  51. Question 51 of 60 type conversion and rounding Hard

    What is the output of int("10", 2) + int("10")?

  52. Question 52 of 60 numeric data types Hard

    What is the type and value of 5 / 5 in Python 3?

  53. Question 53 of 60 programming errors and debugging Hard

    A program runs without crashing but produces incorrect output. What type of error is this?

  54. Question 54 of 60 expressions Hard

    What is the result of not True == False in Python?

  55. Question 55 of 60 operators Hard

    What does 5 & 3 | 2 evaluate to?

  56. Question 56 of 60 assignment statements Hard

    After x = y = [1, 2]; x.append(3), what is the value of y?

  57. Question 57 of 60 named constant Hard

    What is true about a named constant like PI = 3.14159 in Python?

  58. Question 58 of 60 type conversion and rounding Hard

    What is the output of round(3.14159, 2) and its type?

  59. Question 59 of 60 boolean types Hard

    What does the expression 0 or "" or [] or "Python" return?

  60. Question 60 of 60 introduction to python as a programming language Hard

    Which statement best describes Python's execution model?

That's unit 1

Answer a few questions and your score shows up here.