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...)
Written for
- Institution
- Harvard University
- Course
- CS50
Document information
- Uploaded on
- May 26, 2024
- Number of pages
- 2
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cs50
-
cs50 python practice exam test
Also available in package deal