Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Assignment-8

Name- Angrej singh


Student id- 912251
1. Write a python program to write your full name , student number and city to a
file named myinfo1_yyy ( yyy is last 3 digits of your student number)
Source code:

Output:
2. Write a python program to read information from above file.
source code

Output
3. Write a python program to read get 3 inputs from user and write those names to
a file myinfo2_yyy
Source code:

Output:
Here is evidence that data has entered into file successfully

4. Write a python program to read all of the values in the sales.txt file. (uploaded) To read
the data from sales.txt file we can use the given code:

Source code

output
Evidence that data shown by above program is correct:

5. Write a python program to get students details from the user and write those
data as records to a file (i.e student name , studentid and city and write that to a
file named students_yyy)
Source code
Output

Evidence that the above data is successfully uploaded to the file

You might also like