
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Please comment all code
Using a python editor, write a python script that imports os and does the following:
- it changes the directory to net312 created previously.
- it displays the current directory.
- it checks if the path to one of the subdirectories of net312 exists.
- it checks if the name of one of the files created previously is a directory.
- it returns the sizes of both files.
- uses for a loop to print the content of net312 as a list of strings.
- uses a for loop to retrieve all files with the extension .xlsx.
- uses a for loop to join a few files to the net312.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In Python, unlike tet files, data in pickeled binary files can be randmly accessed true or false?arrow_forwardIn c++, ask the user for the name of a file to store the information. Open the file, and make sure it openedcorrectly.Allow the user to process multiple records. Prompt the user at the end of each cycle whether theywant to process any more records. (Hint: what kind of a loop will you use that processes at least oneitem?)Then, for each item in the inventory, your program should:1. Ask the user for the product name (use getline so you can input a multi-word product name)then read it in.2. Ask the user for the wholesale price per item and read that in.3. Ask the user for the quantity and read that in.4. Calculate the total price paid.5. Ask the user for the markup and read that in. (“Markup is usually expressed as a percentage,and is the amount the price is raised to give a retail price).6. Calculate the retail price.That forms a “record”; all the information we know about this item.Write the information to a file.The function should print to the file, on two lines, the information in the…arrow_forwardwrite c programming in raspberry pi # Write the command to copy the information from info.txt to the text files in each folder test01 to test10 # start i=1 while i<=10 do (i++) cat info.txt >> ./test$i/test$i done #end Does the script run as expected and without errors?arrow_forward
- Your Python script will write to a file that already exists. What options [file modes when using the open() function] do you have available?arrow_forwardOn a UNIX-like operating system, a file named "exam.pdf" is owned by user "john". In the file listing, the permissions of this file are given as -rwxrw-r-- What kind of access does user "john" have with respect to this file? Read, Write, and Delete Read, Write, and Execute Read and Write only Read onlyarrow_forwardOne of the file space allocation mechanisms is the most convenient for random access files. Which mechanism is that?arrow_forward
- HW1 Instructions: Your homework must have a cover page contains homework number, your name and student id. Submit the code on word file or pdf file. Write your name and student id as comment in the code (see the example). 回HW1 * HW1.Program B// Name: Your name // ID : Your university ID Busing System; using System.Collections. Generic; using System. Linq; using System. Text; using System.Threading. Tasks; 6. 7. 8. 10 Bnamespace HW1 11 O references class Program { 12 13 re static void Main(string[] args) Submit screenshot after running the code for each part (The screenshot must have your name and ID, see the example). ON CAWINDOWS\system32\cmd.exe Name: Your name ID : Your university ID MENU 1. Show grades 2. Show average 3. Max grade 4. Min grade 5. Modify a grade 6. Search by ID 0. Exit Please enter your choice: Write a menu program in C# that manages students grades for one class. The program lets the user select from a list of options, and if the input is not one of the options,…arrow_forwardWrite two c++ programs to implement a distributed version of a multithreaded Huffman decompressor using the one in project 1 The server program The user will execute this program using the following syntax: ./exec_filename port_no < input_filename where exec_filename is the name of your executable file, port_no is the port number to create the socket, and input_filename is the name of the file with the alphabet's information. The port number will be available to the server program as a command-line argument. The server program receives from STDIN the alphabet's information (using input redirection). The input file has multiple lines, where each line contains information (character and frequency) about a symbol from the alphabet. The input file format is as follows: A char representing the symbol. An integer representing the frequency of the symbol. Example Input File: E 3 G 3 F 1 H 2 Given the previous input file, the expected output for the server program is: Symbol: G,…arrow_forwardselect the python loop that prints directory names, subdirectories, and files in the path. for dirname, subdirs, files in os.walk(path): print(dirname, subdirs, files) fordirname,subdirs,filesinos.path(path):print(dirname,subdirs,files) forfilesinos.path(path):print(files) fordirnameinos.walk(path):print(dirname[0],dirname[1],dirname[2])arrow_forward
- If you wanted to know the number of relocation entries in an EXE file, where would you look?arrow_forwardAssuming the file "File.txt" exists, where must it be located for this code snippet to work without error? ifstream in_file; in_file.open ("File.txt"); In system RAM On the hard drive or flash drive In the same folder (directory) as the source code (.cpp) All of thesearrow_forwardCreate a python program that creates a new file (using write mode 'w'), writes your name on it, and close it. After that open, the file in read mode, read your name from the file and print it to the console.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education