1) Which method is used to read file line by line a) read() b) readlines() c) readline() d) line() 2) Select the correct method to write a list of lines to a file a) write(list) b) writelines(list) c) writelist(list) 3) Select all true statements when a file is opened using the with statement a) The with statement simplifies exception handling b) The file is automatically closed after leaving the block, and all the resources that are tied up with the file are released. c) File reading and writing are faster using the with statement. 4) Select the correct mode to open a file for appending as well as reading a) a+ b) ar c) rw d) ar+ 5) Select the correct output of the following code :fp.seek(5, 1) a) Move file pointer five characters ahead from the current position. b) Move file pointer five characters ahead from the beginning of a file. c) Move file pointer five characters behind from the current position. d) Move file pointer five characters behind ahead from the end of a file.
0%
python quiz
שתף
שתף
שתף
על ידי
Heyarjun51
עריכת תוכן
הדפסה
הטבעה
עוד
הקצאות
לוח תוצאות מובילות
הצג עוד
הצג פחות
לוח התוצאות הזה הוא כרגע פרטי. לחץ
שתף
כדי להפוך אותו לציבורי.
לוח תוצאות זה הפך ללא זמין על-ידי בעל המשאב.
לוח תוצאות זה אינו זמין מכיוון שהאפשרויות שלך שונות מאשר של בעל המשאב.
אפשרויות חזרה
חידון
היא תבנית פתוחה. זה לא יוצר ציונים עבור לוח התוצאות.
נדרשת כניסה
סגנון חזותי
גופנים
נדרש מנוי
אפשרויות
החלף תבנית
הצג הכל
תבניות נוספות יופיעו במהלך המשחק.
תוצאות פתוחות
העתק קישור
קוד QR
מחיקה
האם לשחזר את הנתונים שנשמרו באופן אוטומטי:
?