CS50 Python Practice Exam Test.
CS50 Python Practice Exam Test. Which increment operator does not exist in python -++ or -- -Must use += or -= How to code for loop in python for i in range(#): Data types in python -Bool -Float -Int -Str -range'-tuple -dict -set What is a tuple? -a fixed-length, immutable sequence of Python objects What is a dictionary python -The built-in datatypes in Python is called dictionary. It defines one-to-one relationship between keys and values. Dictionaries contain pair of keys and their corresponding values. Dictionaries are indexed by keys. What is a set in python -A list of items that automatically weeds out duplicates How to import items in python -From (library) import (package); How to instantiate new dictionary python -dict() file open in python file = open(file name, code) -Code could be r, w etc. (read, write...)
Documentinformatie
- Geüpload op
- 26 mei 2024
- Aantal pagina's
- 2
- Geschreven in
- 2023/2024
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden