ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 11.00

Write a regular expression (pattern) for the string

1. Write a regular expression (pattern) for the string family described below. Make sure thatyour pattern only matches a string if it is a member of the family and that it does not rejectstrings that are members of the family. You may find the Web site http://www.regexone.com and Section 8.4 of the textbook to be helpful additions to the lectureslides for this problem. (3 points)Personnel employed by the United States government are assigned a pay grade thatdetermines their annual salary. The pay grade is a code that begins with the letter E, W, or O(each of which is uppercase). The first letter is followed by a single dash and then exactlyone or two digits. Valid E pay grades move from 1 up through 9. Valid W pay grades movefrom 1 up through 5. Valid O pay grades move from 1 up through 10. Some valid pay gradeclassifications include E-1, W-5, O-1, and O-10. Examples of invalid pay gradeclassifications would be E-10, W-6, and O-20.

2. Graphs can be used to model data for social networking sites like Facebook where eachuser is connected to a number of other users. Many social networking sites (such asFacebook) feature a connection called liking or subscribing. This relationship is one-way; ifuser A decides to like user B, that does not imply that user B also likes user A. (4 points total)

(a) Draw a sample graph of the liking connections among the users of a fictional socialnetworking site. Your graph must have at least 6 users and at least 10 likes connections.(2 points)

(b) Does your graph contain a cycle? If so, write down the cycle. (1 point)

(c) What is the order and size of your graph? (1 point)

 

3. Define a Python function named pennies() that calculates the amount of money (inpennies) that a person would earn over a period of time if his or her salary is 1 penny thefirst day, 2 pennies the second day, 4 pennies the third day, and so on, doubling each day.Your function should take the number of days as an argument, and return the total number ofpennies earned. For example, pennies(5) would return 31 (1 + 2 + 4 + 8 + 16). Hint: Themost straightforward way to solve this problem is to use a loop, but there's also a shortcutinvolving the exponentiation operator ** (is there a pattern or correspondence between thenumber of days and the total for that day?). (3 points)

 

CSE 101: Introduction to ComputersFall 2016CSE 101 Homework 3Due:Monday, November 21, within the frst 10 minutes o± lecture. Please type or writeNEATLY,and be sure to include your name and SBU ID number on every page that you submit.This assignment contains nine problems, and is worth a total o± 30 points. Partial credit may beawarded i± you show your work.1. Write a regular expression (pattern) ±or the string ±amily described below. Make sure thatyour patternonlymatches a string i± it is a member o± the ±amily and that itdoes notrejectstrings that are members o± the ±amily. You may fnd the Web sitehttp://www.regexone.comand Section 8.4 o± the textbook to be help±ul additions to the lectureslides ±or this problem. (3 points)Personnel employed by the United States government are assigned a pay grade thatdetermines their annual salary. The pay grade is a code that begins with the letter E, W, or O(each of which is uppercase). The Frst letter is followed by a single dash and then exactlyone or two digits. Valid E pay grades move from 1 up through 9. Valid W pay grades movefrom 1 up through 5. Valid O pay grades move from 1 up through 10. Some valid pay gradeclassiFcations include E-1, W-5, O-1, and O-10. Examples of invalid pay gradeclassiFcations would be E-10, W-6, and O-20.2. Graphs can be used to model data ±or social networking sites like Facebook where eachuser is connected to a number o± other users. Many social networking sites (such asFacebook) ±eature a connection calledlikingorsubscribing. This relationship is one-way; i±user A decides tolikeuser B, that does not imply that user B alsolikesuser A. (4 points total)(a) Draw a sample graph o± thelikingconnections among the users o± a fctional socialnetworking site. Your graph must have at least 6 users and at least 10 likes connections.(2 points)(b) Does your graph contain a cycle? I± so, write down the cycle. (1 point)(c) What is the order and size o± your graph? (1 point)3. Defne a Python ±unction namedpennies()that calculates the amount o± money (inpennies) that a person would earn over a period o± time i± his or her salary is 1 penny thefrst day, 2 pennies the second day, 4 pennies the third day, and so on, doubling each day.Your ±unction should take the number o± days as an argument, and return the total number o±pennies earned. For example,pennies(5)would return 31 (1 + 2 + 4 + 8 + 16).Hint:Themost straight±orward way to solve this problem is to use a loop, but there's also a shortcutinvolving the exponentiation operator ** (is there a pattern or correspondence between thenumber o± days and the total ±or that day?). (3 points)Stony Brook University

CSE 101: Introduction to ComputersFall 20164.Translate the following bit pattern into a (base 10) numeric dotted-quad IP address (be sureto show your work!). (3 points)00010111 01001100 10001011 100101015.The table below lists a series of speci±c mitigation strategies. For each of the threatscenarios described below, listallof the mitigation strategies below that can signi±cantlyimprove security. (6 points)1. You work for the United States government and your machine stores highly-classi±edinformation. You do not use this computer for e-mail, but it is connected to the Internet.Not only are you expected to maintain the con±dentiality of the classi±ed information, it isalso expected that anyone attempting an attack on this machine must be caught andprosecuted.2. You are writing a computer program to store personal identi±cation numbers (PINs) for acompany that manufactures automated teller machines (ATMs).3. You work for a ±nancial company, and your boss frequently e-mails you instructions tomake large, expensive stock purchases and sales. If you get the instructions wrong, youcould lose your job (and cost the company a lot of money).6. Identify a smartphone app that includes a privacy statement or policy. Brie²y summarize thekey points of the policy and evaluate it. Does it seem reasonable to you, or are there partsthat worry you? Can you think of any important things that are missing from the statement orpolicy? (3 points)7.Using a Caesar cipher with a three-character right shift, encrypt the message below (2points):WE ESCAPE TONIGHTantivirus software±le backupone-way encryptioncallback±rewalltwo-way encryptiondigital signaturelog ±lesspam ±lterStony Brook University

CSE 101: Introduction to ComputersFall 20168.Using the RSA encryption algorithm, let p = 3 and q = 5. Then n = 15, m = 8, and e = 11.Calculate the ciphertext code C for the plaintext value 3. Be sure to show your work! (2points)9.De±ne a Python function,longest_word(), that takes a string as its (only) argument. Thefunction returns the longest word from inside the string. For example, callinglongest_word("this is a very long sentence")would return "sentence" (if two or more words tie for the longest, you may return either one).(4 points)Stony Brook University

Answers

(11)
Status NEW Posted 09 May 2017 01:05 AM My Price 11.00

-----------

Not Rated(0)