Answers Latest Version Already Passed
Which of the following is a valid variable name?
A) 123variable
B) my variable
✔✔C) myVariable
D) function()
What will happen if a program has a syntax error?
✔✔A) It will not run properly
B) It will run but give incorrect results
C) It will fix itself
D) It will ignore the error
Which data type is best for storing whole numbers?
A) String
B) Boolean
✔✔C) Integer
1
,D) Float
How can you add a comment in Python?
A) "// This is a comment"
✔✔B) "# This is a comment"
C) "/* This is a comment */"
D) "-- This is a comment"
Why are comments useful in programming?
A) They make code run faster
B) They add extra functionality
✔✔C) They help explain what the code does
D) They are required in every program
Which symbol is used for assignment in most programming languages?
A) ==
✔✔B) =
C) :=
2
, D) ->
What will be the result of in most programming languages?
A) 3
✔✔B) 3.3333
C) 30
D) 0
How do you check if two values are equal in most programming languages?
A) =
✔✔B) ==
C) :=
D) !=
Which statement correctly declares a function in Python?
A) function myFunction():
✔✔B) def myFunction():
C) define myFunction():
3