Syntax in Python MCQs Exercise I


Ques 1 Syntax


What is a Syntax?
  a) Guid Rossum vam.
  b) Realworld Entity
  c) Grammar of Programming
  d) None of these


c is the correct option





Ques 2 Syntax


Which of the following has the correct syntax in Python?


1) int x=10 2) x=10 3) x=(int)"5" 4) x=(float)(6.1)

  a) 1 is correct
  b) 2 is correct
  c) 2 and 3 is correct
  d) 2,3 and 4 is correct


b is the correct option





Ques 3 Syntax


Which of the following has the correct syntax in Python?


1) x=[2,4,5,6,7,8] 2) x=list[3,45,53,32,2] 3) x=list(3,4,3,3,5,3,2) 4) x=list[12,2,4,[3,4]]

  a) 1 is correct
  b) 3 is correct
  c) 1 and 3 is correct
  d) 2,3 and 4 is correct


a is the correct option





Ques 4 Syntax


What is the maximum length of the Identifier?
  a) 16
  b) 32
  c) 256
  d) Not a fixed Length


d is the correct option