Interfacing with the Raspberry Pi Quiz Answer. In this post you will get Quiz & Assignment Answer Of Interfacing with the Raspberry Pi Quiz
Interfacing with the Raspberry Pi Quiz
Offered By ”University of California”
Week- 1
Module 1 Quiz
1.
Question 1
What is DHCP used for?
1 point
- It is a network protocol used to assign IP addresses.
- It is a network protocol used to communicate between name servers.
- It is a hardware component that connects a host to the network.
- It is a type of firewall that protects your local network
2.
Question 2
What is an SSH server?
1 point
- A machine which guarantees security of the local network
- A program which initiates ssh requests
- A program which responds to incoming ssh requests
- A tool for diagnosing a network application
3.
Question 3
When an ssh client is invoked at the command-line with the “ssh” command, what other argument must be provided on the command line?
1 point
- A DNS server address
- A specification of what type of data will be transferred
- A domain name or IP address to connect to
- A specification of what type of communication is desired
4.
Question 4
What command will reveal the IP address of your Raspberry Pi?
1 point
- ipaddr
- nslookup
- ifconfig
- dig
5.
Question 5
What is a fair definition of the term “protocol”?
1 point
- A set of rules for communication
- A tool to analyze network communication
- Any program that performs networked communication
- A method to declare the existence of a new node in the network
6.
Question 6
What does an IP address uniquely identify?
1 point
- A switch which is part of the Internet
- A hardware network interface card
- A host communicating on the Internet
- A process connected to the Internet
7.
Question 7
How big is a port TCP/UDP number?
1 point
- 8 bits
- 16 bits
- 24 bits
- 32 bits
8.
Question 8
The nslookup command will show the IP address corresponding to a given domain name.
1 point
- True
- False
Peer-graded Assignment: TCP vs. IP: What’s the Difference?
TCP Protocols:
1.Process-to-Process communication
2.Reliable communication
3.Process naming
IP Protocols:
1.Host-to-Host Connection
2.Unreliable communication
3.Host naming scheme
Week- 2
Module 2 Quiz
1.
Question 1
What is a difference between clients and servers on the Internet?
1 point
Only servers can receive data
Servers initiate requests for service
Clients initiate requests for service
Only clients can send data
2.
Question 2
What Python function is used to perform a DNS lookup?
1 point
gethostbyname()
dnslookup()
nslookup
getipaddress()
3.
Question 3
What Python function is used by the client to establish a connection between sockets?
1 point
connect()
bind()
join()
recv()
4.
Question 4
The recv() function performs a non-blocking wait, by default.
1 point
True
False
5.
Question 5
When is the code inside an except clause executed?
1 point
When any error occurs during execution
When any code before the except clause causes an appropriate exception
Whenever the code inside the associated try clause is executed
When code inside the associated try clause causes an appropriate exception
6.
Question 6
Binding a socket on the server-side requires what information?
1 point
The port number for communication
The MAC address of the server
The IP address of the client
The duration of the requested communication
7.
Question 7
What is a “live” server?
1 point
A server that is computationally complex
A server that serves many requests over a long time
A server that is also a client
A server that starts at boot time
8.
Question 8
Sockets can be used to communicate between two Raspberry Pis.
1 point
True
False
Peer-graded Assignment: Write a simple web server on your Raspberry Pi
Part 1
Part 2
Week- 3
Module 3 Quiz
1.
Question 1
What is a fair definition of an API?
1 point
An online service
A name server
A type of router
A protocol for communicating between programs
2.
Question 2
What is a good reason to use an SDK rather than directly using an API?
1 point
An SDK is usually faster than an API
An SDK may be available when an API may not be
An SDK is usually easier to use than an API
Some functions can be accessed through an SDK which cannot be accessed through an API
3.
Question 3
What is Pip?
1 point
A tool to send network packets programmatically
A tool for interacting with online services
A tool to install Python packages
A tool to monitor network traffic
4.
Question 4
In the Twython library, what function sends a tweet?
1 point
change_status()
Twython()
tweet()
update_status()
5.
Question 5
In the Twython library, what function is used to detect tweets in a stream that contain a given string?
1 point
stream.statuses.filter()
find_string()
scan_stream()
contains()
6.
Question 6
What is the name of the callback function that is invoked when a tweet that contains a selected string is found in a stream?
1 point
detected()
on_success()
on_detection()
when_found()
7.
Question 7
The TwythonStreamer class defines the callback function which is invoked when a tweet containing a given string is found in a stream.
1 point
True
False
Peer-graded Assignment: Read the Contents of a Web Page
Week- 4
Module 4 Quiz
1.
Question 1
What is the name of the Python package used to control the Raspberry Pi camera module?
1 point
picamera
rpicamera
camera
picam
2.
Question 2
What function in the camera library is used to take a picture?
1 point
picture()
capture()
snap()
photo()
3.
Question 3
What is a “duty cycle”?
1 point
The duration of the high pulse of a square wave
The period of a square wave
The frequency of a square wave
The fraction of time a square wave is high
4.
Question 4
Why is pulse width modulation useful?
1 point
It is commonly used to transmit video data
It can be used to mimic an analog signal
It can be used to read data from camera sensors
It is used to control the Raspberry Pi camera module
5.
Question 5
How many input wires does a servo have?
1 point
2
3
4
5
6.
Question 6
Why is it common to use an external power supply to drive a servo?
1 point
A servo requires power in the form of a square wave
A servo needs more current than a microcontroller can provide
AC power is needed to drive a servo
A servo needs more voltage than a microcontroller can provide
7.
Question 7
The CSI camera interface of the Raspberry Pi needs to be activated before using the camera module.
1 point
True
False
8.
Question 8
The speed of a servo motor is easily controlled.
1 point
True
False
Peer-graded Assignment: Connect an LED to your Raspberry Pi