Part-A: Consider first ten letters of your name and for each letter encode with an integer If "Ahmed Naser" are number. For example: the first ten letters from your name, then the array of integers will be {0, 7, 12, 4, 3,13,0,18,4,17}. 1 1 1 1 1 1 2 2 2 2 2 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 01234567891 1 1 1 abcdef ghi jk I m n ораr t wXу Z S u V
Q: Part 1: Write a program that uses a 2-D array to store the highest and lowest temperatures for each…
A: NOTE: Since programming language is not mentioned. Therefore answering the question in Python…
Q: Consider the first ten letters of your name and for each letter encode with an integer number. For…
A: Reorganize a large number of element into asending order or in descending order or in alphabetical…
Q: You are a movie theater manager. You are givena two-dimensional array with 6 rows and 6 columns - 36…
A: NOTE: Programming language is not mentioned, so I am doing in C++ In this question, we are asked to…
Q: 1. Write a program to define an array of size 10, ask the user to enter the array elements. Replace…
A: #include <stdio.h>#include <stdlib.h> int main() { int arr[10]; printf("Enter 10…
Q: Let say an Array consist of String names as follow: [i] [0] [1] [2] [3] [4] [5] [6] String John…
A: CODE IN JAVA import java.util.Scanner; public class Main { //function to search an…
Q: What is the value of x[6] if an array is declared and initialized as follows: double x [ ] =…
A: Array in programming language is used to store the set of values with same data type. Array are…
Q: Q3] Write a code program to read a two-dimensional array (A), and assign values to an array (A) by…
A: Solution:-- 1)The given question has required for the solution with the code program for…
Q: A positive integer is called a perfect number if it is equal to the sum of all of its positive…
A: In the thread we use the isPerfectNumber() function to check a number is perfect or not.and then we…
Q: Q3] Write a code program to read a two-dimensional array (A), and assign values to an array (A) by…
A: ANSWER:-
Q: Daily average temperature information of one year city is kept in a one-dimensional array. Daily…
A: Code: #include <stdio.h>int fun(int arr[],int size)//defining the function{ int…
Q: A prime integer is any integer that is evenly divisible only byitself and 1. The Sieve of…
A: Program: #include <iostream> #include<iomanip> using namespace std; int main() {…
Q: Write a program that simulates a lottery. The program should have an array of 5 integers named…
A: Program to simulate a lottery. Declare an integer type array named winningDigits[] to store the 5…
Q: Define the meaning of the following array by illustrating the array list. i. int…
A: Array Indexing starts from 0 And the last index will have NULL(\0) to indicate the end of array
Q: Chef has an array A consisting of N positive integers. This is a base array. Chef has an array B…
A: #include<bits/stdc++.h>using namespace std; typedef pair<int,int> par; #define int long…
Q: Consider the int Array below and determine the values of A and B so that Array[0] has an integer in…
A: Introduction: A random number is those numbers that can be any in the given range. rand() is a…
Q: Write a program that simulates a lottery. The program should have an array of five integers named…
A: Note: - As the programming language is not mentioned to write the program. So, I am using the C++…
Q: Write a program that uses arrays to store the registration number of your total class.it then search…
A: Here, we take an integer array named registration to store the registration number of class_size…
Q: Write a program that simulates a lottery. The program should have an array of five integers named…
A: Let us consider a C++ program that simulates a lottery, the program should have an array of five…
Q: A lottery ticket buyer purchases 10 tickets a week, always playing the same 10 5-digit “lucky”…
A: The header statements are used to give input and take inputs and to search the winning number…
Q: Q3| Write a code program to read a two-dimensional array (A), and assign values to an array (A) by…
A: ANSWER:-
Q: What is the value of x[6] if an array is declared and initialized as follows: double x [] = {6.6,…
A: What is the value of x[6] if an array is declared and initialized as follows: double x [] = {6.6,…
Q: Create a 4x3 array of letters from a through l and call it array1. Copy the array and call it…
A: python reshape python provides build in functions which help in changing the shape of array without…
Q: 6.display a value at a specified index in an array of integers For example, display the 3rd element…
A: display a value at a specified index in an array of integers For example, display the 3rd element in…
Q: Consider first ten letters of your name and for each letter encode with an integer number. For…
A: Note: Since we only answer up to 3 sub-parts, we’ll answer the first 3. Please resubmit the question…
Q: Rajesh is new in the program and just now he is familiar with the array in programming and he wants…
A: Array indexing starts from 0 So, from position l to r, we have to print the elements from l-1 to r-1…
Q: This program is written in java. 2D arrays (matrices/grids) Write a program that takes 20…
A: import java.util.Arrays;import java.util.Scanner; class Student implements Comparable<Student>…
Q: 1. Fibonacci The Fibonacci numbers are a sequence of numbers where each number after the first two…
A: here in this question we have asked to print Fibonacci series by taking input from user for no of…
Q: If a is an array with n number of values always a[1] will give second value.
A: Because we know that in an array index starts from 0. Which means that the first element will be…
Q: Part-A: Consider first ten letters of your name and for each letter encode with an integer number.…
A: The complete answer is given below.
Q: Write an application that stores the following nine integers in an array: 10, 15, 19, 23, 26, 29,…
A: Program : public class Main { public static void main(String[] args) { final int intager_Num = 9;…
Q: Write a program that simulates a lottery. The program should have an array of 5 integers named…
A: Program code: //include the required variables #include <iostream> #include <ctime>…
Q: Consider the 2D array “list". Each row represent a class say Bangla or English or Math, and the…
A: Step 1:- Program Approach:- 1.Include the header file 2.Declare and initialize the 2D array…
Q: JAVA PROGRAMMING Two words (spelt in uppercase) are similar if and only if all letters in the 1st…
A: Here I have first of all created the class named TwoWords. In this class, I have created 2 variables…
Q: Consider the int Array below and determine the values of A and B so that Array[0] has an integer in…
A: Here we need to produce a random number that will be stored inside the array. Now to produce the…
Q: A lottery ticket buyer purchases ten tickets a week, always playing the same ten five-digit "lucky"…
A: Program: // C++ Version 14#include <iostream>using namespace std;// function to perform the…
Q: In the space below, write me a doubleword array of 7 integers and name this array 'theAvengers'.
A: Array is collection of characters in sequence. Array is defined in .data directive of program as a…
Q: Exercise 2. (Pascal's Triangle) Pascal's triangle Pn is a triangular array with n+1l rows, each…
A: Coded using Python 3.
Q: Write a program that creates a two dimensional array with 4 rows and 3 columns that contains the…
A: The answer is
Q: Write a program that simulates a lottery. The program should have an array of five integers named…
A: The complete code is given below.
Q: Q5:Witer a program that read 2d array of integer with the size (5 X 5) then swap the elements of the…
A: The program declares a two-dimensional array of size 5x5 where 5 rows and 5 columns. Read the array…
Q: а. Write a declaration for the array below and name it matrix. -1 7 1 1 2 -1 -1 4 1 6 b. Given the…
A: a) For a 2-Dimensional integer array, initialization can be done by putting values in curly braces…
Q: An array called number contains 20 integer values and must be filled with values in the following…
A: The following is the required C++ program:- #include <iostream>using namespace std;int main(){…
Q: Game plays a very crucial role in over daily life. It helps you to stay fit in your life so let's…
A: Input-Output Details: First line will contain TT, number of testcases. Then the testcases follow.…
Q: A positive integer is called a perfect number if it is equal to the sum of all of its positive…
A: positive integer is called a perfect number if it is equal to the sum of all of its positive…
Q: Write a program that simulates a lottery. The program should have an array of five integers named…
A: C++ code: #include <iostream>#include <ctime>using namespace std; int main() { //array…
Q: A three-dimensional array called watermelon is declared as based on the row-wise manner as below:…
A: The given array is int watermelon [3][2][2] This means the total number of rows is 3 and number of…
Q: Given an int0 nums array, return the sum of the first five elements from the array. Note that nums…
A: public int sumFirstFive(int[] nums) { int n = nums.length; int sum = 0;…
Q: Write a program that simulates a lottery. The program should have an array of 5 integers named…
A: The algorithm for writing a program that compares the digits of a lottery number to the digits of…
Q: Below is an application in which the number of days for each month in the year is stored in an…
A: We have three line to modify here initialize DAYS array add output statement. increment looping…
Q: Game plays a very crucial role in over daily life. It helps you to stay fit in your life so let's…
A: Input-Output Details: First line will contain TT, number of testcases. Then the testcases follow.…
Step by step
Solved in 2 steps with 6 images
- Count consecutive summers def count_consecutive_summers(n): Like a majestic wild horse waiting for the rugged hero to tame it, positive integers can be broken down as sums of consecutive positive integers in various ways. For example, the integer 42 often used as placeholder in this kind of discussions can be broken down into such a sum in four different ways: (a) 3 + 4 + 5 + 6 + 7 + 8 + 9, (b) 9 + 10 + 11 + 12, (c) 13 + 14 + 15 and (d) 42. As the last solution (d) shows, any positive integer can always be trivially expressed as a singleton sum that consists of that integer alone. Given a positive integer n, determine how many different ways it can be expressed as a sum of consecutive positive integers, and return that count. The number of ways that a positive integer n can be represented as a sum of consecutive integers is called its politeness, and can also be computed by tallying up the number of odd divisors of that number. However, note that the linked Wikipedia de0inition…GIVE authentic Answer: WEB TECHNOLOGIES Consider the Marks against each students in different subjects Student Names Database Tot Marks : 60 PF Tot Marks : 80 Marketing Tot Marks : 60 Irfan 56 45 59 Salma 67 56 52 Inayat 54 40 48 Basharat 56 53 51 Store these details in the Multidimensional Associative Array. Display the output as shown here S# Student Name Obt: Marks %age= (Obt:Marks / 200) * 100.0 Grade 1 Iranf 160 80 B 2 Salma 175 87 A 3 Inayat 142 71 C 4 Basharat 160 80 B A >80% B (71-80%) C (61-70%) D(51-60%) F<50% Grade Summary Total A Grade = 1 Total B Grade = 2 Total C Grade = 1 Total D Grade = 0 Total F Grade = 0 Add complete set of Screen Shots against all the steps…A) Starting with a dynamic array of length = 32 and numElements = 30, the length after we execute 90 insert at end operations is [answer]Group of answer choices 120 122 128 none of the above B) In each of the following cases, we start with a dynamic array of length = 128 and numElements = 64. After we execute 30 delete last operations, the number of elements isand the length isAfter we execute 32 delete last operations, the number of elements isand the length isAfter we execute 60 delete last operations, the number of elements isand the length is no hand written
- You are given an array called source, with length n, and a set of m arrays called target, each alsowith length n. The arrays contain only positive integers. The arrays are unsorted. For any numberx, the smallest number in target[x] is guaranteed to be smaller than target[x+1]. All the numbers intarget are unique. The following figure illustrates an example of valid source and target arrays forthis case, where n=5 and m=6. source = [14, 13, 15, 11, 12] target[0] = [4, 2, 1, 3, 5]target[1] = [6, 8, 7, 10, 9]target[2] = [14, 15, 12, 11, 13]target[3] = [17, 20, 16, 18, 19]target[4] = [22, 21, 24, 23, 25]target[5] = [30, 29, 28, 27, 26] The smallest number in each array in target is styled with bold and italic. You can quickly see thatthe smallest number in target[0] is smaller than the smallest number in target[1], the smallestnumber in target[1] is smaller than the smallest number in target[2], and so on. You can also seethat there is no duplicate number within the arrays in target. You…You are given an array called source, with length n, and a set of m arrays called target, each alsowith length n. The arrays contain only positive integers. The arrays are unsorted. For any numberx, the smallest number in target[x] is guaranteed to be smaller than target[x+1]. All the numbers intarget are unique. The following figure illustrates an example of valid source and target arrays forthis case, where n=5 and m=6. source = [14, 13, 15, 11, 12] target[0] = [4, 2, 1, 3, 5]target[1] = [6, 8, 7, 10, 9]target[2] = [14, 15, 12, 11, 13]target[3] = [17, 20, 16, 18, 19]target[4] = [22, 21, 24, 23, 25]target[5] = [30, 29, 28, 27, 26] The smallest number in each array in target is styled with bold and italic. You can quickly see thatthe smallest number in target[0] is smaller than the smallest number in target[1], the smallestnumber in target[1] is smaller than the smallest number in target[2], and so on. You can also seethat there is no duplicate number within the arrays in target. You…You are given an array called source, with length n, and a set of m arrays called target, each alsowith length n. The arrays contain only positive integers. The arrays are unsorted. For any numberx, the smallest number in target[x] is guaranteed to be smaller than target[x+1]. All the numbers intarget are unique. The following figure illustrates an example of valid source and target arrays forthis case, where n=5 and m=6.source = [14, 13, 15, 11, 12] target[0] = [4, 2, 1, 3, 5]target[1] = [6, 8, 7, 10, 9]target[2] = [14, 15, 12, 11, 13]target[3] = [17, 20, 16, 18, 19]target[4] = [22, 21, 24, 23, 25]target[5] = [30, 29, 28, 27, 26]The smallest number in each array in target is styled with bold and italic. You can quickly see thatthe smallest number in target[0] is smaller than the smallest number in target[1], the smallestnumber in target[1] is smaller than the smallest number in target[2], and so on. You can also seethat there is no duplicate number within the arrays in target. You are…
- You are given an array called source, with length n, and a set of m arrays called target, each alsowith length n. The arrays contain only positive integers. The arrays are unsorted. For any numberx, the smallest number in target[x] is guaranteed to be smaller than target[x+1]. All the numbers intarget are unique. The following figure illustrates an example of valid source and target arrays forthis case, where n=5 and m=6.source = [14, 13, 15, 11, 12] target[0] = [4, 2, 1, 3, 5]target[1] = [6, 8, 7, 10, 9]target[2] = [14, 15, 12, 11, 13]target[3] = [17, 20, 16, 18, 19]target[4] = [22, 21, 24, 23, 25]target[5] = [30, 29, 28, 27, 26]The smallest number in each array in target is styled with bold and italic. You can quickly see thatthe smallest number in target[0] is smaller than the smallest number in target[1], the smallestnumber in target[1] is smaller than the smallest number in target[2], and so on. You can also seethat there is no duplicate number within the arrays in target. You are…You are given an array called source, with length n, and a set of m arrays called target, each alsowith length n. The arrays contain only positive integers. The arrays are unsorted. For any numberx, the smallest number in target[x] is guaranteed to be smaller than target[x+1]. All the numbers intarget are unique. The following figure illustrates an example of valid source and target arrays forthis case, where n=5 and m=6. source = [14, 13, 15, 11, 12] target[0] = [4, 2, 1, 3, 5]target[1] = [6, 8, 7, 10, 9]target[2] = [14, 15, 12, 11, 13]target[3] = [17, 20, 16, 18, 19]target[4] = [22, 21, 24, 23, 25]target[5] = [30, 29, 28, 27, 26] The smallest number in each array in target is styled with bold and italic. You can quickly see thatthe smallest number in target[0] is smaller than the smallest number in target[1], the smallestnumber in target[1] is smaller than the smallest number in target[2], and so on. You can also seethat there is no duplicate number within the arrays in target. You…A magic square is a square array of non-negative integers where the sums of the numbers on each row,each column, and both main diagonals are the same. An N × N occult square is a magic square with Nrows and N columns with additional constraints:• The integers in the square are between 0 and N, inclusive.• For all 1 ≤ i ≤ N, the number i appears at most i times in the square.• There are at least two distinct positive integers in the square.For example, the following is a 5 × 5 occult square, where the sums of the numbers on each row, eachcolumn, and both main diagonals are 7:0 0 0 3 42 4 0 0 10 0 3 4 05 0 0 0 20 3 4 0 0For a given prime number P, you are asked to construct a P × P occult square, or determine whether nosuch occult square exists.InputInput contains a prime number: P (2 ≤ P ≤ 1000) representing the number of rows and columns in theoccult square.OutputIf there is no P × P occult square, simply output -1 in a line. Otherwise, output P lines, each contains Pintegers…
- in C PROGRAMMING LANGUAGE AND COMMENT EVERY LINE SO I CAN UNDERSTAND EVERY STEP PLEASE, A C program can represent a real polynomial p(X) of degree n as an array of the real coefficients al, al, ..., an (an ‡ 0). p(X) = a0 + a1X + a2 X2 + . . .+ anXn Write a program that inputs a polynomial of maximum degree 8 and then evaluates the polynomial at various values of x. Include a function get_poly that fills the array of coefficients and sets the degree of the polynomial, and a function eval_poly that evaluates a polynomial at a given value of x. Use these function prototypes: void get_poly ( double coeffIl, int* degreep); double eval_poly( const double coeffIl, int degree, double x);Suppoce we're given numpy arrays of names and scores, where each row in the scores array lists the midterm and final scores for that respective student. For example, Carol has a 75 on the midterm and 99 on the final. names = np. array([ "Alice" "Bob". "Carol","Derek ","Erin"]) Scores = np.array([ [95, 98], [82, 88], [75, 99], [80, 90], 85, 82 ]]) Write function avgMidtermNoC that takes ve parameters names and score arrays, and returns the average score on the midterm, exduding anyone who's name starta with C.2022-02-14 20:52:35 Write the primitive counting results for your 40 sheep: 40= For example, the answer for "14" would be (1,1,1,0), meaning that the first division of sheep had none left over, but every other division of sheep had a leftover sheep. Include the commas and the parentheses in your answer.