Take BTech Tuition from the Best Tutors
Search in
Lesson Posted on 21/07/2021 Learn Computer science
File Handling in Python - Basic Concept
Manoj Singh
I am a experienced, passionate, dedicated teacher and tutor with over 12 years of experience in teaching,...
File (Flat) Handling in Python
Types of files in python:
1: Text file: Stores data in the form of characters. Customarily used to store text/string data.
2: Binary file: Stores data in the form of bytes. It can be used to store text, images, audio and video.
Open() Function:
To open a file, we use the open() function. Here we need to mention 'filename' and 'mode' in which we want to open that file.
Syntax: File Handler = open("FileName", "Mode")
Mode: w (write), r(read), a(append) etc.
A file that is opened should be closed with the help of the close() function.
To write in a file, we use the write() function.
Example:
A simple Python program to open, write, read and close a file.
# Open a file in write mode
f = open("myFile.txt","w")
# Take input from user
str = input("Enter text: ")
f.write(str) # Write the string into file
f.close() # Close the file
# Again open the file in read mode
print("Now Reading that file....")
f = open("myFile.txt","r")
str = f.read() # Read from file
# Display the content on the screen
print(str)
f.close() # Close The file
Thank You!
read lessAnswered on 04/10/2020 Learn Computer science
CorpWin Technologies
Python is the most common coding language and is widely used. It is a favourite tool along being a flexible and open-sourced language. Its massive libraries like- Numpy, Pandas, SciPy, Keras, Pytorch, Tensorflow, Scikit-Learn and e.t.c which are used for data manipulation and are very easy to learn for a beginner or for professionals who want to know.
Data Science is the broad field in which you can learn about many concepts like- Python and R programming, Statistics, Probability and other topics of Mathematics, Machine Learning Algorithms, Techniques, Data Visualization tools- Big Data, SQL, NoSQL, Apache-Spark, MongoDB, PowerBI and e.t.c.
To learn data science and their other concepts, I would suggest you CorpWin technologies Programs. Corwin is one of the best training platforms to learn data science in depth. They provide the best course curriculum in which you will get all essential concepts of data science like- Python and its massive libraries concepts, Mathematics concepts, Techniques of ML and e.t.c.
read lessLesson Posted on 14/07/2020 Learn Computer science
Pritam Chatterjee
I am an Oracle Certified IT Trainer with 7+ years of experience, providing Training on Java Technologies....
Have you ever wondered, why did you learn so many subjects and what is the use of them, do you need to know them, will you be using them?
Well, my answer is the subjects that you study, covers different aspects of Computer Science. Computer Science is not only coding, after all.
For example, you work in an IT Company which provides solutions to some FMCG company. Now:
1. They need to have their computer network, need to manage the network.
2. They have a lot of data, which needs to be stored in the database. So effective database management is critical.
3. The company also need to have different kinds of applications, starting from their desktop app, website, mobile app. For developing these apps, knowledge of Algorithm and programming is extremely important.
4. For a standard and effective development process, following Software Engineering principles are fundamental.
5. We also need to learn about effective cost management.
6. Now if you work in an innovative product based company, then you need to work with Algorithms, Compilers, Theory of Computation, Operating Systems and perhaps some Maths as well.
7. There are many organizations which work on different hardware and networking devices. If you want to be a part of them, you need to know the related subjects as well.
This way, all the subjects we learn, have the potential to play a significant role in different phases of our career and for choosing different career options, where you can grow better and become successful.
Remember, learning doesn't harm; it can only benefit you, in the short term as well as in the long run.
read lessTake BTech Tuition from the Best Tutors
Lesson Posted on 09/06/2020 Learn Computer science
Rohan
Many students have difficulty in understanding pointers. The best way to understand pointers is through memory representation.
Whenever we declare a variable, the computer allocates some amount of memory corresponding to this particular variable. Pointers are variables that store the address of another variable
read lessLesson Posted on 29/05/2018 Learn Computer science
Arijit Dutta
An Engineer Student loves teaching. Helps student to be in good position. Develop their skills. Go...
2Phase Lock in Distributed Database:
In this protocol, it is required that all the data items must be reached in a mutually independent manner, i.e. when one transaction is performing, then no other transaction should interrupt the process.
It requires both locks and unlocks being done in two phases:
But 2 PL won’t be able to solve other problems such as cascading rollback.
read lessLesson Posted on 09/04/2018 Learn Computer science
Rahul Kasgar
More than three years of experience and can provide training in java(se), Android application development...
1. when we execute the java file, JVM is loaded into memory.
2. In JVM, first class loader starts which loads the class into memory, i.e. it divides the code intoRuntime Memory Area.
3. Runtime memory consists of:-
4. After the class loader, execution engine (JIT) runs which translate bytecode to machine-operable code.
read lessTake BTech Tuition from the Best Tutors
Lesson Posted on 28/03/2018 Learn Computer science
Difference between System Software and Application Software
Ganesa Moorthi A
I worked in various institutes and engineering colleges as tutor about 8+ years and currently doing software...
The software is the virtual component of the computer through which we are doing our work.
The software is classified as System software and Application Software.
System Software provides the platform for loading application software. System software is the one who controls the hardware and helps users to do their work. It is the soul of the computer system. Once the device is designed, system software is loaded to make it live.
It is similar to humans, where once the body (hardware) is built, the body attains its system software in the name of soul.
Without system software, the hardware is a dead body. And also without hardware, the software is useless.
Application software is a set of programs or commands written to do a user-specific task. Different people use different types of application software. Based on the user requirements, we load our application software on the primary system software. It is like the development of our mind and knowledge based on the situation, schooling, surroundings for a human being.
So generally hardware is the body of the computer, while system software and application software are considered as soul and mind of computer respectively.
read lessLesson Posted on 22/03/2018 Learn Computer science
Ganesa Moorthi A
I worked in various institutes and engineering colleges as tutor about 8+ years and currently doing software...
In a computer, there are two major parts available namely hardware and software. both plays an important role in proper functioning of the computer.
Hardware are the touchable and physical parts of the computer. Hardware are visible to the user and it is visible even to a blind man. It is like the body of computer. Hardware provides the basic skeleton to load and work with software.
Software are nothing but the imaginary parts or virtual parts of the computer. Software is more complex and unable to understand easily. It is like mind or soul of the computer. It can't be touched or damaged. After finishing the design of hardware, Software is loaded into it.
When the hardware and software are working together, it becomes a computer. Without software, computer hardware is just a electronic board with connections. Without hardware, software cannot be used and can be stored only in CD or Pen Drive.
read lessLesson Posted on 24/02/2018 Learn Computer science
Post - Fix Expression Evaluation Procedure
SR-IT Academy
SR - IT Academy is one of the leading tutorial point providing services like tutoring and computer training...
Algorithm:
1) Create a stack to store operands (or values).
2) Scan the given expression and do following for every scanned element.
a) If the element is a number, push it into the stack.
b) If the element is a operator, pop operands for the operator from stack. Evaluate the operator and push the result back to the stack
3) When the expression is ended, the number in the stack is the final answer.
read lessTake BTech Tuition from the Best Tutors
Lesson Posted on 16/10/2017 Learn Computer science
Deepak
I am quite passionate about teaching physics and computer science. Linux OS and the whole system functions...
UrbanPro.com helps you to connect with the best BTech Tuition in India. Post Your Requirement today and get connected.
Ask a Question
The best tutors for BTech Tuition Classes are on UrbanPro
The best Tutors for BTech Tuition Classes are on UrbanPro