Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

by python [make a txt file with 100,000 random numbers either 1 or 0, then u make 5 matrixes out of it each list in

by python [make a txt file with 100,000 random numbers either 1 or 0, then u make 5 matrixes out of it each list in the matrix contains 10 numbers from the file so like list 1 had first 10 nums, 2nd has next 10 nums etc, and then it checks the pattern of the matrix if a letter C is made out of 1s then add one to c if letter K is made then add 1 to K etc

image text in transcribed

Q1. Fill a text file with 100,000 random Os and ls. Starting from the beginning of the file, fill 5 matrices with the dimensions of 10x10. That means, of the 100.000 digits, take the first 10 and place them in the first list. Take the 2nd 10 and place them in the 2nd list. Take the 3rd 10 and place it in the 3rd list. Etc. Until you do 10 lists. Compare this against our representation of C and then against our representation of K as below. Referring to Q1, consider the representation of C and K as follows: For C: [ [1000000000], [1000000000], [1000000000], [1000000000], [1000000000], [1000000000], [1000000000], [1000000000], [11 l For K: F. [1000010000], [1000100000), [1001000000], [1010000000], [1100000000], [1100000000], [1010000000], [1001000000] [1000100000] [1000010000] A) Find how many Cs and Ks exist in the file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions