Introduction to Python Set-1

Instruction:-

  • Number of Questions : 25
  • Total Marks : 25
  • Each question carry 1 Marks.
  • No negative marking

  •  

    Results

    #1. What is the correct file extension for Python files?

    #2. Which of the following is used to output text in Python?

    #3. Which of the following is a valid variable name in Python?

    #4. What is the result of this expression: 3 + 2 * 2?

    #5. Which of the following is a correct comment in Python?

    #6. What will be the output of print(“Hello” + “World”)?

    #7. Which function is used to get input from the user in Python?

    #8. What data type is the result of input() in Python?

    #9. Which keyword is used to define a function in Python?

    #10. What will be the output of this code?x = 5
    print(type(x))

    #11. Which of the following is not a data type in Python?

    #12. What will be the output of this code?
    print(10 // 3)

    #13. How do you start a multi-line comment in Python?

    #14. What is the output of:
    print(type(“5”))

    #15. Which of the following is a logical operator in Python?

    #16. What is the output of this code?
    print(5 != 3)

    #17. Which function converts a string to an integer?

    #18. What symbol is used for exponentiation (power) in Python?

    #19. Which of the following will cause an error in Python?

    #20. What is the correct way to write a function in Python?

    #21. What will be the output of this code?
    print(len(“Python”))

    #22. Which of the following is used to repeat code multiple times?

    #23. What is the output of this code?
    x = 10
    x += 5
    print(x)

    #24. What keyword is used to check conditions in Python?

    #25. Which of the following is the correct syntax for an if-else statement?

    Previous
    Finish

    Leave a Comment

    Your email address will not be published. Required fields are marked *