Write a python program that:
Q: Implement the first round of AES ( Advanced Encryption Standard ) in python. Given a message…
A: Advanced Encryption Standard (AES) is a specification for encrypting electronic data published in…
Q: (B2). Implement a randomized Skip-List with operations Insert(), Delete() and Search(). Your program…
A: fix these drawbacks good data structure for a dictionary ADT Generalization of sorted linked lists –…
Q: Implement the quadratic formula) function. The function takes 3 arguments, a, b, and e, and computes…
A: quadratic_formula(a,b,c): START determinant = sqrt(b*b - 4*a*c) x1 = ( -b + determinant)/2*a x2 =…
Q: In python, get_tokens_from_equation(line): Takes one string as input that contains any combination…
A: Answer for given question -
Q: write a python function that replaces the None values with the average from that column. example:…
A: Step 1: In this function, I have created a list to store the result. Step 2: Next, I have iterated…
Q: (B2). Implement a randomized Skip-List with operations Insert(), Delete() and Search(). Your program…
A: PROGRAM : #include <bits/stdc++.h> using namespace std; //using class to create a node…
Q: Write a python function create_frequency() that takes a string and finds the frequency of each word…
A: function create_frequency(string)- START SPLIT the string and store in the list name words DECLARE…
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Algorithm - Design a method with one argument as a array. Now use the below logic to solve the…
Q: write a python function that replaces the None values with the average from that column. example:…
A: Here I have defined the function named replace_with_mean(). In this function, I have created a list…
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: In this problem, we need to design a javascript program. Input - one array output - integer
Q: Write in Python programming language a program that simulates a pushdown automaton that only…
A: Input : String s Output: Accepted by PDA that recognised : L = {a^m b^n | 0 ≤ m ≤ n}.
Q: Write a C++ program that reads a maximum of 100 integers from the keyboard, stores them in a long…
A: Required:
Q: Open a file and write a program in C++, for example: #include void main { int x int y X=x+y } Then…
A: To take advantage of both languages' strengths, programmers employ Python bindings, which enable…
Q: Write some code to test whether the length of the variable dna1 # is greater or equal to 10 bases…
A: Please find the answer below :
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Step-1: Start Step-2: fucntion countLayers(rug) Step-2.1: Declare variables layer and initialize…
Q: A run is a sequence of adjacent repeated values. Write a Python script to generate a sequence of 20…
A: Python code :- import random def run():#create a list of 20 random number in range (1,6)List = []for…
Q: (B2). Implement a randomized Skip-List with operations Insert(), Delete() and Search(). Your program…
A: The program implemented in Step 2 1) Will read the text from the file with the numbers divided by…
Q: IN JAVA SCRIPT Create a function that takes an integer n and reverses it. Examples rev (5121) ➡…
A: We need to write a Javascript function to reverse a number.
Q: Write a code in C++: Write a program to factor a polynomial of the form x² + bx + c, where b and c…
A: This C++ program is to find the factors of a polynomial. Consider a polynomial x2+bx+c, here b and c…
Q: Write a java program for the following: Create String array with the following values. [ "ee", "ff",…
A: Make a recursive binary search program to search for a string taken input by user in the given…
Q: Write a python program that merges two ordered arrays (A and B) of integers into a single ordered…
A: Program: # Python Version 3# main functiondef main(): # declare the arrays A =…
Q: write a python function that replaces the None values with the average from that column. example:…
A: Here is the python code: See below steps:
Q: 23. The following python program can work with parameters. def f(x): def f1(*args, **kwargs):…
A: The above python program can work with combining keyword and non keyword variable length parameters.…
Q: Write a Python function: def second (A) which takes as input an array A of integers and returns the…
A: Solution: Given,
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: In this problem, we need to design a javascript program. Input - one array output - integer
Q: Implement the quadratic_formula() function. The function takes 3 arguments, a, b, and c, and…
A: Below is the modified python code to implement the quadratic equation and find its roots: -…
Q: Design and implement a program called RainfallV2 that reads a list of floating-point numbers from…
A: The answer is given below:-
Q: 2
A: Program code: //class definitionclass Test{ //main method public static void main(String[] args)…
Q: a program that randomly fills in 0s and 1s into a 4-by-4 matrix, prints the matrix, and finds the…
A: Step 1: Below the program that randomly fills in 0s and 1s into a 4-by-4 matrix, prints the matrix,…
Q: Write a java program for the following: • Create String array with the following values. [ "ee",…
A: Declare the array with the values Then ask for the string that is to be searched. Divide the array…
Q: 2. Write a Python program that sorts the array of letters [m, o, n, i, c, a] into alphabetical…
A: Python program to sort the array of letters using bubble sort is given step 2 :-
Q: The Pascal triangle can be used to compute the coefficients of the terms in the expansion (a +…
A: Write a C program that creates a two-dimensional matrix a representing the Pascal triangle of size…
Q: Write a complete C++ program which can multiply three matrices. O D D Example A=D D O D D O B = D O…
A: In this code, two 3x3 matrices are input by the user and the matrices are multiplied and hence the…
Q: Write a C program like this read a number from user such as Key1=1556 find 1156=x(mod100) assign…
A: Solution: Given, read a number from user such as Key1=1556 find 1156=x(mod100) assign x to an…
Q: Write a C program to find words in a word search. User types the word and the program confirms which…
A: Concept Used: Backtracking : Backtracking is a method based on an algorithm to solve problems. It…
Q: Write a C program "nlp2.c" to read the file "out1.dat" and write the non stop words to an output…
A: #include <stdio.h>#include <string.h> int main(void){FILE *fptr1, *fptr2; // creating a…
Q: Write a program that computes and prints the mean and standard deiviation of a list of integers x1…
A: #include <iostream>#include <cmath>using namespace std; int main(){ int n; int…
Q: (B2). Implement a randomized Skip-List with operations Insert(), Delete() and Search(). Your program…
A: Actually, program is an executable software that runs on a computer.
Q: IN JAVA SCRIPT Create a function that takes an integer n and reverses it. Examples rev (5121) ➡…
A: Algorithm - Create a method with one integer as an argument. Now use the below logic return…
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Algorithm - Design a method with one argument as a array. Now use the below logic to solve the…
Q: Write a C++ program that read 12 integer values from user, store values in Matrix of 4 X 3. Create…
A: C++ code :- #include <iostream>#include<cmath>using namespace std;int main() { int…
Q: implement F using NOR & NOT F=CD(B+C)A(BC'+DE') please can you show all steps
A:
Q: Write a C++ program that reads a maximum of 100 integers from the keyboard,stores them in a long…
A: program: #include <bits/stdc++.h> using namespace std; // Driver codeint main(){ int…
Q: (B2). Implement a randomized Skip-List with operations Insert(), Delete() and Search(). Your program…
A: Random Skip list I will be using bits/stdc++.h library for STL functionalities here Srand is used…
Q: example python code for generating dot plots for two DNA sequence (in a text file, where the first…
A: import matplotlib.pyplot as new#used for data visualization new.style.use('seaborn') #seaborn…
Q: Write a Python program to check whether a nxn matrix is a magic square.The magic square is a set of…
A: A list is a type of collection available in Python. The list can contain same or different data…
Q: Implement a function findMixedCase in Python that: accepts a single argument, a list of words, and…
A: code : import re def findMixedCase(nstr): for word in nstr: resup,reslow=False,False…
Step by step
Solved in 2 steps with 3 images
- write a python function called subsequence() that finds the longest common subsequence of two DNA strands. The function should take two DNA strands (strings) as input and should return the longest common subsequence. example: subsequence ("AATTCAT", "CAT") return "CAT" subsequence ("CAAAT", "CAT") return "CA subsequence("CCG", "TTA") returns "" subsequence ("AATGTACCC", "AATCTTACCT") return "TTACC" subsequence ("AATCTTAGCC", AATCAAAGCC") returns "AATC"using python In a jupyter notebook, implement a recursive function anagrams() that computes anagrams of a given word. An anagram of word A is word B that can be formed by re-arranging the letters of A. For example, the word pot is the anagram of the word top. Your function will take as an input the name of a file of words and as well a word, and print all the words in the file that are anagrams of the input word. Used the attached file words.txt as your file of words. words.txt Points for handling base case, a step that brings you closer to solving the problem, and correctly reading from the file. >>> anagrams("words.txt, trace) crate cater reactWrite a python script that: Reads a DNA sequence from a fasta file. Asks input for promoter sequence. Looks for promoter sequence in the DNA sequence and once finds the promoter, it looks for the start codon. The start codon should be within 30 bases of the promoter sequence. For example, if the promoter sequence was "TAATA", then it will find the first TAATA and then look for the start codon ATG within 30 bases of TAATA. After the start codon, look for at least 50 consecutive amino acids before a stop codon is found. If True, print('Gene found'). If False, print('Gene not found'). FYI: You can also write the script in any other programming language of your choice. please help!URGENT
- Write a Python program, in a file called forest_map.py, to solve the following problem: Hansel and Gretel are abandoned in a forest with only a bag of breadcrumbs and must find their way home. The forest is laid out in a grid pattern. They can only take a step at a time through the forest, going either South or East. They cannot move diagonally, they cannot move North, and they cannot move West. As they leave a space, they will leave a breadcrumb (“*”) behind just in case -- if they have any breadcrumbs left. They do not leave a breadcrumb in the space where the path ends. If they don’t have enough breadcrumbs, they still move on to the next space, leaving their current space as it was. Given (as input) the number of breadcrumbs Hansel and Gretel have, and given the forest layout (as a fixed, but changeable, two-dimensional list in your code), determine whether Hansel and Gretel have just enough, more than enough, or not enough, breadcrumbs to leave in the path to get to the end. If…Write a function-based C++ program that reads an integer array from a file (“input.txt”) and finds all integers which start and end with the same digit. Write these integers into an output file (“output.txt”). You may assume the length of each integer to be a minimum of 2 digits. Example: Input File 12 131 54 7541 9849 6456 Output File 131 9849 6456Write an R program that makes a dotplot of two DNA sequences S1= ATGCTA and S2= ATTCTA by plotting a dot at every position where the two sequences share an identical letter. Use the function “makeDotPlot1()” to make a dotplot between sequences setting the argument “dotsize” to 0.1 (this determines the radius of each dot plotted). Do you find the same regions and if not, can you explain why?
- Implement the first round of AES ( Advanced Encryption Standard ) in python. Given a message with 128 bits, two subkeys subkey0 and subkey1, your program should be able to perform one AddKey before Round 1 and the corresponding operations (SubBytes, ShiftRows, Mix-Columns, and AddKey) in Round 1, and output the result of the encryption after Round 1.write program code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; Then add their corresponding elements and produce an output file “output.txt”. If the number of elements are not equal, fill the elements of the smaller file up with “0” s. Sample output: Elements of the “Data1.txt”: 3 5 7 8 9 Elements of the “Data2.txt”: 45 11 Elements of the “Output.txt”: 48 16 7 8Write a program that reads a string (an array of characters) from a text file. Reverse thestring using the Stack and write the reversed string to another text file. in c++
- Write a Python program in a .py file that includes the following: Convert Euclid’s algorithm to find the greatest common divisor (GCD) of two positive integers to a recursive function named gcd. If you haven't seen Euclid's algorithm before, look in chapter 3 or do some research to see an example before you begin your design.Write a program in C which takes 3 arguments, an inputfile (either ASCII or binary), an integer factor n, and an output file name template. It shoulddivide the input file into nxn smaller images corresponding to parts of the image. Forexample, suppose that the invocation is:pgmTile sampleFile.pgm 3 sampleFile_<row>_<column>.pgmthen the programme should read in sampleFile.pgm and output 9 smaller images, named:sampleFile_0_0.pgmsampleFile_0_1.pgmsampleFile_0_2.pgmsampleFile_1_0.pgmsampleFile_1_1.pgmsampleFile_1_2.pgmsampleFile_2_0.pgmsampleFile_2_1.pgmsampleFile_2_2.pgmImplement function rotate that takes a string argument s and an integer argument n, and rotates the string s to the left by n times. For example, the code char s[] = "systems"; rotate(s, 3); will change s into "temssys", while the code char t[] = "abcd"; rotate(t, 1); will change t into "bcda". void rotate(char *w, int j)