Question: Please answer the following questiong using Python language. Question 1 What is the correct way to concatenate two strings: 'Hello' and 'class'? O Hello' -

Please answer the following questiong using Python language.
Please answer the following questiong using Python language. Question 1 What is
the correct way to concatenate two strings: 'Hello' and 'class'? O "Hello'
- 'class' O "Hello * 'class" O 'Hello' + 'class' O None
of the above Question 2 How to add a key-value pair to
a dictionary d, where key = 'G678' and value = 'Jane Doe'?

Question 1 What is the correct way to concatenate two strings: 'Hello' and 'class'? O "Hello' - 'class' O "Hello * 'class" O 'Hello' + 'class' O None of the above Question 2 How to add a key-value pair to a dictionary d, where key = 'G678' and value = 'Jane Doe'? = = O d.appned('G678': Jane Doe') O d['G678'] = 'Jane Doe' O d.add('G678': Jane Doe') O d['Jane Doe'] = 'G678' O All of the above Question 3 How many times will the word 'PYTHON' be printed? word = 'PYTHON = for n in range(3): print(word) O 1 02 O 3 O None of the above Question 5 What is the content of gadgets at the end of the following code? >>> gadgets = ['phone', 'camera', 'laptop', 'tablet'] >>> gadgets.insert(-2, 'camera lens') No change to the list ['camera lens', 'phone', 'camera', 'laptop', 'tablet'] O ['phone', 'camera', 'camera lens', 'laptop', 'tablet') O ['phone', 'camera', 'laptop', 'tablet', 'camera lens'] Question 4 Which of the following are correct formats of the Python 'open' statement (check all that apply)? Of=open ("C:/Data/datafile.txt", "r") infile = "C:/Data/datafile.txt" f = open(infile, "r") f = open("C:/Data/datafile.txt") O f = open("C:/Data/datafile.txt", "w") infile = "C:/Data/datafile.txt" f = open(infile, "a")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!