Think Crusaders

An illustration of a group of coders battling against a giant quiz question surrounded by code symbols, vibrant colors, and a sense of adventure

Think Crusaders: A Challenge for Coders

Welcome to the Think Crusaders quiz, where your programming knowledge will be put to the test! This quiz features 21 questions covering various aspects of coding, data types, and programming concepts.

Test yourself on topics such as:

  • Data Types
  • Python Functions
  • Control Statements
  • String Operations
  • Rounding Techniques
21 Questions5 MinutesCreated by CodingLion912
A) 10
B) 11
C) 0
D) Error
2) What will be the output of the following statement ? printf( 3 + "goodbye");
A) goodbye
B) odbye
C) bye
D) dbye
3) Which of the following data type will throw an error on modulus operation(%)?
A) int
B) float
C) char
D) short
4) Which of the following cannot be a variable?
A) __init__
B) in
C) it
D) on
5) print(chr(ord(‘B’)+1))
A) B
B) C
C) B+1
D) Error
6) What is the type of sys.argv?
A) set
B) list
C) tuple
D) string
7)What is the output of the expression? round(4.5676,2)
A) 4.5
B) 4.6
C) 4.57
D) 4.56
A) no output
B) I i I i I i …
C) a b c d e f
D) Error
9) Which of the following is not a keyword?
A) eval
B) assert
C) nonlocal
D) pass
10) To concatenate two strings to a third what statements are applicable ?
A) s3 = s1 . s2
B) s3 = s1.add(s2)
C) s3 = s1.__add__(s2)
D) s3 = s1 * s2
11) We want to round off x, a float, to an int value, The correct way to do is
A) y = (int)(x + 0.5)
B) y = int(x + 0.5)
C) y = (int)x + 0.5
D) y = (int)((int)x + 0.5)
12) The keyword used to transfer control from a function back to the calling function is
A) Switch
B) Goto
C) go back
D) Return
13) Which of the following cannot be checked in a switch-case statement?
A) Character
B) Integer
C) Float
D) Enum
A) Hello
B) CSE
C) Error
D) None of the above
15) Relational operators cannot be used on:
A) structure
B) long
C) strings
D) float
16) Which of the following is an invalid if-else statement?
A) if (if (a == 1)){}
B) if (func1 (a)){}
C) if (a){}
D) if ((char) a){}
A) 2
B) 1
C) 0.5
D) Undefined behaviour
18) What is the output of “hello”+1+2+3 ?
A) hello123
B) hello
C) Error
D) hello6
19) t=(1,2,3,4), t[2]=10,print(t)
A) 1,2,10,4
B) 1,10,2,4
C) Error
D) 1,10,10,4
20) What is the output of the following? print('Ab!2'.swapcase())
A) AB!@
B) Error
C) aB!2
D) aB1@
Email:
{"name":"Think Crusaders", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the Think Crusaders quiz, where your programming knowledge will be put to the test! This quiz features 21 questions covering various aspects of coding, data types, and programming concepts.Test yourself on topics such as:Data TypesPython FunctionsControl StatementsString OperationsRounding Techniques","img":"https:/images/course3.png"}
Powered by: Quiz Maker