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

Quiz

Python 3 Quiz 1

Alexandra Brown 12 Fragen

Quiz starten

Fragen in diesem Quiz (12)

  1. 1Which file extension should you use at the end of your Python files to make the most of the IDLE environment?
    1. A.Python
    2. B.py
    3. C.IDLE
    4. D.idl
  2. 2If a language is case-sensitive, it means what?
    1. AThe capitalization of each letter of output is important.
    2. BThe capitalization of each letter of the file name is important.
    3. CThe capitalization of each letter of source code is not important.
    4. DThe capitalization of each letter of source code is important.
  3. 3In Python, in order to print a literal string to the screen, what must you do to the characters that make up the string?
    1. AEnclose them in double quotes (" ").
    2. BEnclose them in ({ }).
    3. CEnclose them in (< >).
    4. DEnclose them in ([ ]).
  4. 4What is the error in the following line of code that reads the city name from the user?

    Ex. location = eval( input("Please enter the name of your city: "))
    1. AThe eval function is used to convert the input data to a number, but a city name is a string.
    2. BThere is no function named input in Python 3.
    3. CYou aren't allowed to pass the input function a string.
    4. DThe variable name, location, is a reserved word.
  5. 5Which of the following characters is used to tell Python that the remaining part of the line is a comment?
    1. A'
    2. B//
    3. C/
    4. D#
  6. 6Which of the following keywords is used to get access to a library file?
    1. Ausing
    2. Bimport
    3. Cinclude
    4. Dlibrary
  7. 7Which of the following statements about nested ifs is correct?
    1. APython doesn't allow you to nest an if statement inside another if statements.
    2. BPython allows you to put an if statement only inside the true path of another if statement.
    3. CPython allows you to put an if statement only inside the false path of another if statements.
    4. DPython allows you to put an if statement inside either the true or false path of another if statement.
  8. 8Which of the following statements will determine if the value in the letter variable comes before the letter "S"?
    1. Aif letter is Before "S":
    2. Bif letter < "S":
    3. Cif letter > "S":
    4. Dif letter != "S":
  9. 9Which of the following statements will determine if the playAgain variable contains the word "yes" and the maxTries variable is less than the number 5?
    1. Aif playAgain = "yes" and maxTries < 5:
    2. Bif playAgain == "yes" and maxTries < "5":
    3. Cif playAgain == yes and maxTries < 5:
    4. Dif playAgain == "yes" and maxTries < 5:
  10. 10What is the output after running the following code segment?

    for i in range(0, 5):
    print(i)
    1. AThe number 5 printed five times.
    2. BThe values increasing from 0 to 4, inclusive.
    3. CThe values decreasing from 4 to 0, inclusive.
    4. DThe values increasing from 0 to 5, inclusive.

Informationen

Beschreibung
10th grade Computer Science Quiz am Python 3 Quiz 1, erstellt von Alexandra Brown am 30/10/2018.
Sprache
English
Aufrufe
0
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck