Python Quiz-3


Python Quiz-3


PYTHON QUIZ ONLINE



This python quiz contains a list of questions with hidden answers. This quiz is on the topics string,built-in functions, Python basics, operators, conditional statement and loop.

1. Which of the following is not true about ‘if' ?
  1. It is a conditional statement
  2. 'If’ should always accompany with ‘else'
  3. At the end of 'if' condition there is a colon
  4. Both A and C
2. Pick the conditional operators from the given options ?
  1. +
  2. >
  3. *
  4. /
3. A ____ variable can be used to let one part of your program know when something happens in another part of the program.
  1. local
  2. linear
  3. global
  4. flag
4. The built-in function to find largest and smallest value are __
  1. lage,small
  2. big,little
  3. max,min
  4. high,low
5. Which of the following operators denotes modulo division ?
  1. /
  2. //
  3. %
  4. \
6. An empty string is represented as ____
  1. " "
  2. string ()
  3. ()
  4. * *
7. Which of the following builtin function is used to find the number of characters in a string ?
  1. num()
  2. chars()
  3. Len()
  4. count()
8. ____ module heps to print random numbers .
  1. random
  2. num_rand
  3. arbitrary()
  4. distinct ()
9. A ____ is used to pick a part of a string ?
  1. indexing
  2. slicing
  3. clipping
  4. Cutting
10. Which of the following is used to access the characters of a string ?
  1. indexing
  2. slicing
  3. clipping
  4. cutting

Comments

Popular posts from this blog

Finding the percentage in python - HackerRank solution

HackerRank challenges with solutions (Rearrangement, Formula, Word sorting, Numbers, Sentence)

ginortS in Python - HackerRank solution