What is a function used for opening files?, load, run, open, By default the file is opened in text mode, but you can also open the file in binary mode. Which one of the following syntaxes opens the file in binary mode?, x = bopen('demofile.txt'), x = open('demofile.txt', 'b'), The default opening mode when opening a file with the open() function is 'a' for 'reading'., true, false, After opening a file with the open() function, which method can be used to write the content?, list(), read(), show(), write(), To read only one line, we can use another method, which one?, readline(), lread(), readl(), If you call the readline() method two times, it will return the two first lines., true, false, After opening a file with the open() function, which method can be used to read the content?, list(), read(), show(), To read only one line, we can use another method, which one?, readline(), readline, If you call the readline() method two times, it will return the two first lines., true, false, What happens to the original file content if you open a file like this: ‘a’, you can write at the end, write from a start, with open('demofile3.txt', 'w') as f:, It will return an error, A file will be created, open('demofile3.txt', 'w'), The original content will be overwritten, Any new content will be added after the original content, with open('demofile3.txt', 'w') as f:, error, not error, What could you replace the 'w' with to instead return an error if the file already exists?, 'x', 'b', To read only one line, we can use another method, which one?, readline(), lread(), readl().
0%
Python
Baham ko'rish
Baham ko'rish
Baham ko'rish
tomonidan
Almas92
Class 10
Tarkibini tahrirlash
Chop etish
qo'shib qo'yish
Ko'proq
Tayinlashlar
Ilg'orlar ro'yxati
Ko'proq ko'rsatish
Kamroq koʻrsatish
Ushbu etakchilar jadvali hozirda xususiy. Uni ommaga etkazish uchun
Ulashish-ni
bosing.
Liderlar ro'yxati resurs egasi tomonidan o'chirib qo'yildi.
Ushbu etakchilar ro'yxati o'chirib qo'yilgan, chunki sizning variantlaringiz resurs egasidan farq qiladi.
Qaytish moslamalari
Viktorina
ochiq-oydin shablon. Etakchilar ro'yxati uchun ballar yaratmaydi.
Tizimga kirish talab qilinadi
Vizual uslub
Shriftlar
Obuna talab etiladi
Moslamalar
Namunani almashtirish
Hammasini koʻrsatish
Faoliyatni o'ynaganingizda ko'proq formatlar paydo bo'ladi.
Ochiq natijalar
Bogʻdan nusxa olish
Tez javob kodi
& Olib tashlash
Tahrirlashni davom ettirish:
?