WEEK 6 2022 Flashcards
What is the value that is assigned to the variable f in the given piece of python code?
i, f, str=50, 50.68, “Welcome to python”
50.68
What is the output of the following piece of python code?
x=’17’
y=’23’
z=x+y
print(z)
1723
Fill in the blanks. Raspbian is a/n ___________
Operating system
What is the output of the following piece of Python code?
t1 = ‘Welcome to python coding’
print(t1[8:14])
to pyt
Fill in the blanks. Raspberry Pi 3 Model B has a GPU support of _________
400 MHz video core IV
Which of the following represents the command used for rebooting Raspberry Pi?
sudo reboot
(T/F)It is not possible to return multiple values from a function in Python.
False
What is the data type of the variable ls in the following piece of Python code?
ls= {1: “item”, “key”: “21”, “year”: 2022}
dictionary
(T/F)A function in Python may or may not return a value
True
What are the basic modes to open a file in python?
All of these
[Read mode (r) and write mode (w) Append mode (a)
Both read and write mode (r+)]
What are the socket types that exist in Python based socket programming?
SOCK_DGRAM and SOCK_STREAM
(Y/N)Does Python support exception handling?
Yes
Which of the following must be used to terminate a loop and move to the next code after the loop?
break
Select the option that does not represent a keyword in Python language?
a. while
b. if
c. try
d. integer
integer
(T/F)Raspberry Pi does not support any other language other than Python?
False