Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MCQ - 1- MCQ-2- MCQ-3- Please tell me these mcq correct answer..Thanks.. 1 point Suppose you want to write in a file named abc.txt. However,

MCQ - 1-

image text in transcribed

MCQ-2-

image text in transcribed

MCQ-3-

image text in transcribed

Please tell me these mcq correct answer..Thanks..

1 point Suppose you want to write in a file named "abc.txt". However, if "abc.txt" already exists in the same directory, you want to keep the previous contents of the file. What will be your code?* open('abc.txt', 'r') open('abc.txt, w') open('abc.txt, a') open('abc.txt, x) open('abc.txt', 'w') open('abo txt', 'a') O ', open('abc.txt' , 'x') Suppose you want to write in a file named "abc.txt. However, if "abc.txt" already exists in the same directory. you do not want to keep the previous contents of the file and rewrite the file. What will be your code? * O open('abc.txt', 'T) open(abc.txt, 'w") open('abc.txt, a') open('abc txt, x) open('abc.txt', 'W') open('abc.txt', 'a') O ' open('abc.txt' , X) What will be the output of open('abc.txt', 'x')? select all that applies * 2 points create a file named "abc.txt" and open it in write mode if there exists no file named "abc.txt" in that directory create a file named "abc.txt" and open it in read mode if there exists no file named "abc.txt" in that directory raise an error "abc.txt" already exists in the same directory open the file in write mode and replace the previous contents if "abc.txt" already exists in the same directory open the file in write mode and keep the previous contents if "abc.txt" already exists in the same directory

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

Students also viewed these Databases questions

Question

=+19.1. Suppose that u(12) and fe L". Show that IfIl, Ilfilo.

Answered: 1 week ago

Question

2. What are the different types of networks?

Answered: 1 week ago