GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Loops, Function and strings

Kaithlyn Reyes 14 Fragen

Quiz starten

Fragen in diesem Quiz (14)

  1. 1myString.isupper() method returns a string in upper case
    1. ATrue
    2. BFalse
  2. 2When checking if a string is a sub-string of another, both the in operator and the find(substring) method can be used. Both will return a True value when the substring is part of the given string.
    1. Atrue
    2. Bfalse
  3. 3Given the following string:

    str = "This is a Quiz!"

    both statements will return the same character

    str[8]

    str[-7]
    1. Atrue
    2. Bfalse
  4. 4All of the following string methods require a substring as an argument.

    endswith()

    replace()

    find()
    1. Atrue
    2. Bfalse
  5. 5The following is a valid function definition:

    def _getInput():

    name = input()

    return name
    1. Atrue
    2. Bfalse
  6. 6A statement in one function can access a local variable in another function.
    1. Atrue
    2. Bfalse
  7. 7The argument is assigned the value of a parameter when the function is called.
    1. Atrue
    2. Bfalse
  8. 8The built-in input() function is an example of a void function.
    1. Atrue
    2. Bfalse
  9. 9A function that is defined will never execute unless it is called.
    1. Atrue
    2. Bfalse
  10. 10global number
    def function1(number):
    number += 7
    return number

    number = 5
    number = function1(number)
    print(number)

    From the given code, the variable number in function1() is used as a global variable.
    1. Atrue
    2. Bfalse

Informationen

Beschreibung
Quiz am Loops, Function and strings, erstellt von Kaithlyn Reyes am 15/11/2022.
Sprache
English
Aufrufe
6
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck