PRP201c_-_SU_2024_-_PE2_2580.webp
P

PRP201c_-_SU_2024_-_PE2_2580.webp

Enter the end of the range: 100
How many unique integers would you like to generate? 10
Generated list of unique integers: [50, 42, 52, 94, 29, 96, 82, 80, 48, 31]
Number of even numbers: 8
Number of odd numbers: 2
Exercise 2: (3 marks)
Write a program named filter_prime_numbers that reads a text file named integers_data.txt, extracts all prime numbers, and saves them to a new file named prime_numbers.txt.
Content of the input file (integers_data.txt):2, 13, 24, 5, 6, 27, 8, 29, 33
Content of the output file (prime_numbers.txt):2, 13, 5, 29
Result of the program:
Original list of numbers: [2, 13, 24, 5, 6, 27, 8, 29, 33]
List of prime numbers: [2, 13, 5, 29]
Exercise 3: (4 marks)
Write a program that implements the following tasks:
Read book, member, and book-borrowing information from the respective CSV files (books.csv, members.csv, and borrowings.csv).
Insert the book, member, and borrowing data into the tables of a database named library_borrowing.sqlite. Ensure no duplicate entries for books and members.
+ 100%
Zoom

Close
Chưa có bình luận nào.

Thông tin

Category
PRP201c
Thêm bởi
precious_treasure
Ngày thêm
Lượt xem
1,378
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRP201c_-_SU_2024_-_PE2_2580.webp
File size
88.4 KB
Dimensions
1920px x 907px

Share this media

Back
Bên trên Bottom