pencil-icon
Build your own quiz

University

Image

Introduction to Python

473
plays

20 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt

    What is a correct syntax to return the first character in a string?

    x="Hello".sub(0,1)

    x="Hello"[0]

    x=sub("Hello",0,1)

    x=substring("Hello",0,1)

  • 2. Multiple Choice
    1 minute
    1 pt

    Identify the below expressions which would result in False?

    a) False and True b) 1==1 or 2==1

    c) 1==1 and 2!=1 d) True and 1==1 e) False or 1>2

    c, d

    a, e

    b, c, d

    a, c

  • 3. Multiple Choice
    30 seconds
    1 pt

    what is the output of the below code snippet?

    num1=10

    num2=7//2

    num2*=num1

    print(num2)

    10

    35.0

    30

    30.0

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?