The main function creates 5 pixels with random red, green, and blue values. Complete the id_color function to return “red” if the red value is greater than the green and blue, “green” if the green value is greater than the red and blue, and “blue” if the blue value is greater than the red and green. If there is no clear maximum value (for example, if the red and green values are the same) return None. Do not change the main function.
Q: row space асе
A: Given :- In the above question , a matrix is mention in the above given question Need to choose…
Q: Which of the following are invalid variable names? Why? Click here to view code image Int…
A: A variable is a name given to a memory location. A variable can be of any type and it stores a…
Q: Q3: Create a Windows Form application that Contains a Form with 3 TextBox(s), ListBox, label, and 2…
A: C# is the programming languages and it is the general purpose, multi paradigm programming language…
Q: Escape from a vertical tab using this method. Is there any way to get around this? This function…
A: Overview: An escape sequence is a series a of characters A that is turned into another character…
Q: Create a function that prints converts the light sensor into 3 (equal range) categories based on the…
A: creating a function to 3 equal range category The advantages of simulating real-time events have…
Q: Create two integer arrays with the 3 items. Assign random values to each item and find the sum of…
A: Given that, Create two integer arrays with the 3 items. Assign random values to each item and find…
Q: 3. - Using Outline component create three buttons and write program for each buttons of Outline. 1)…
A: Let's us assume this is a html , Javascript and css query, and let's start creating the three…
Q: Question 20 (1 point) You have a flexbox with child boxes in a row. You want the child boxes to be…
A:
Q: code up the addAppointment() function. This function runs when the user clicks on the 'MAKE…
A: In this question we have to write a HTML and JavaScript program where we have implement…
Q: (X- Plots 5.1 Create plots of the following functions from x = 0 to 10. a. y = e2 b. Y = sin(x) c. Y…
A: Plots in matlab using code. Y=e^x Y=sinx
Q: A vertical tab escape sequence. \n O lb If char is a letter of the alphabet, this function returns…
A: Vertical Tab Escape Sequence: An escape sequence is a series of characters that, when used inside a…
Q: Create the following form using C# Create a form ,name this new form: Loops Name all your objects…
A: Answer 7: Objective: The current price of laptops and the desired price would be inserted in two…
Q: **The below screenshot has VBA codes in the editor windo 3 subs. The instructions on the expected…
A: According to the information given:- We have to define VBA codes on the basis of instructions…
Q: make the code on the bottom insted of having a saying "invalid" ontop of the screen have it say…
A: The program is written using HTML, Javascript and CSS. Please check the source code and output in…
Q: Create a single regular expression that matches a time expressed in the form "1:45 PM". Additional…
A: Here is the explanation about the regular expression:
Q: This assignment mainly uses turtle module but do not use circle() method of the turtle. You will…
A: In here we create a program to draw a polygon without use of circle(). here we present a small…
Q: Randomly generate a number in range [1, 12]. Map this number to a season: if the number is 3, 4, or…
A: Programming Language => PYTHON I have provided PYTHON CODE along with CODE SCREENSHOT…
Q: 6.16 (Displaying a Bar Chart) One interesting application of computers is to display graphs and bar…
A: C# Program: using System;namespace c_Sharp_codes{ class Program { static void…
Q: The text area control create a area.
A: The text area control to create which area is as follows:
Q: Create a Deque object containing all integers from 1 to 20. Display the front and rear elements…
A: static void queueDeque() { if(front == rear) { System.out,printf("empty"); return; } else { for (int…
Q: Change your code below to create a pattern using nested loops. Your initial needs to appear at…
A: The program is implemented in python with procedural approach. The program prints the initials of…
Q: Attach a function to the focus event. The focus event occurs (display a message regarding the text…
A: We have to attach a function to the focus event and display a message regarding text field when…
Q: The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500,…
A: A “Do...While” loop used for traversing an array should always have a statement to increment the…
Q: Create a MyStruct variable and set the second field to an array of zeros.
A: Creating structures in C: Structures are used o create user defined data types in C/C++. The…
Q: Format the range K2:K3 with Accounting Number Format with zero decimal places. Format cell K4 with…
A: Following needs to be performed for the given excel : Format cells K2 : K3 with Accounting Number…
Q: 3. Write one line of code for each step a - g. Save your code as PE2_3_YourName.py. All string text…
A: Need to write program using Python which should contain : And Output Example :
Q: # Global constant for body mass which is equal to 703 # Create variables and initialize all of them…
A: # Global constant for body mass which is equal to 703BODYMASS = 703 #Create variables and initialize…
Q: The graphic functions commonly used to create and print text are described : outtextxy(string) true…
A: Please find the answer below :
Q: eate a code where every time that only cell B1 is changed, create a new tab and that this tab is…
A: using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
Q: add a code at the "Search a book" where i can search for a book and if the word matches the book it…
A: ALGORITHM:- 1. Declare and initialise an arrayList object for Book Titles. 2. Take input for the…
Q: Complete the following script so that the variable totarea will contain the total area of all…
A: Ans: totarea rows so, total code snippet will be: import arcpy…
Q: Q3: Write down the code for the BMI Calculator design, where BMI= weight /height^2, Then display one…
A: Please find the answer below :
Q: The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500,…
A: If clause Conditional sentences are also known as conditional clauses or if clauses. They are used…
Q: Accept the two sides and an angle included by these two sides, and find the area and third side of a…
A: Accept the two sides and an angle included by these two sides, and find the area and third side of a…
Q: The strNames array contains 100 elements. Which of the following statements assigns the number 99 to…
A: The method to return the highest subscript in the specified dimension in the array is…
Q: In this task, you need to evaluate the following four expressions and demonstrate at least 5 steps…
A: Note: This is a multipart-based problem. Only the first three parts are solved. Kindly send the…
Q: What happens when the user clicks on submit button in the form? a. NOT all fields of the form will…
A: When the form is submitted all the fields will get automatically stored. But where they are stored…
Q: visual basic, make a code that display a savings account balance for each of 5 years using rates…
A: Answer: Method 1: Visual Studio Source Code: Form.vb: Option Explicit OnOption Strict OnOption Infer…
Q: The formula in cell C2 is =A$2. Autofill is used by dragging C2's autofill box across to D2, E2, and…
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: initialization will be done within the code (largest value 99.9 minutes). When the remaining time…
A: Program explanation: Include the header file. Take the input for minutes and pass it to the…
Q: Develop a form that has 5 inputs where user should be able to enter 5 numbers. a. When you click in…
A: The required functionality is implemented with HTML and JavaScript language and code for the same is…
Q: The ideal gas law relates the pressure P, volume V, and temperature T of an ideal gas: PV = nRT…
A: Matlab code: clc;clear all;close all;format short R=8.314;n=1;T=[100 200 300…
Q: For the equation =>y =2x+1 1. Createx vector 0 to 10 with colon operator for each 1 point. 2. Create…
A: The following is the required python program:- #importing the required packagesimport…
Q: f the statement below describes "t is the finishing touch always used in font design the spacing…
A: Which of the statement below describes "tracking"? A. is the finishing touch B.always used in font…
Q: In cell B6 in the Purchasing sheet, insert the payment function to calculate the monthly payment…
A: We have to calculate the monthly payment using cell references.
Q: Create a function that gets the total amount and percentage of covid case data for each Age Group…
A: function getSummeryOfAges(data) { // initialising summeryObject with 0 var summeryObject = {…
1. The main function creates 5 pixels with random red, green, and blue values. Complete the id_color function to return “red” if the red value is greater than the green and blue, “green” if the green value is greater than the red and blue, and “blue” if the blue value is greater than the red and green. If there is no clear maximum value (for example, if the red and green values are the same) return None. Do not change the main function.
Step by step
Solved in 3 steps
- VBA PROBLEM: Create a code where every time that only cell B1 is changed, create a new tab and that this tab is renamed with the value that is entered in B1 and the other cells, that is, B2: B11 have the same values that are entered in the Sheet1. The values of A1: A11 must always remain the same. Like in the examples below (image 1 and 2).3. Randomly generate a number in range [1, 12]. Map this number to a season: if the number is 3, 4, or 5, map it to “Spring", if the number is 6, 7, or 8, map it to "Summer", if the number is 9, 10, or 11, map it to "Fall", and if the number 12, 1, or 2, map it to "Winter". Display season nameFunction for button "Publishing Date": • Name this function by your last name (for example, function yamoutl)). When the user clicks on the button "Publishing Date" (after filling all the textboxes), the current date and time will be printed after the text "Published on:" CSCI375 Grades Exam-1 (70 Exam-2 98 Project 86 Exam-3 80 Show the Grades Your Grades: Exam-1 - 78, Exam-2 - 98, Project - 85, Exam-3 - 80 Publishing Date Published on: 5/10/2021, 5:39:08 PM Change Background Color
- The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. The statement intSales (2) += 10 will _____. replace the 900 amount with 10 replace the 900 amount with 910 replace the 12000 amount with 10 replace the 12000 amount with 12010TicTacToeCreate the board display the board Set token to ‘x’Loop //at most 9 times, but end loop when someone wins{ Ask player where to place token display the board Checks if won Change token (if it was ‘x’ change to ‘o’ and vice versa)}Either congratulate someone on winning or say it was a draw. Create a 17x17 array of characters and put ‘ ‘ in each element.2. Write a loop to make the first horizontal line, and another to do the second horizontal line3. Write a loop to make the first vertical line, and another to create the second vertical line4. Put in the numbers (this is so the player can choose where to put the token). You will need 9 separate assignment statements.Please do not give solution in image format thanku Acompany has hired you to develop an application to generate passwords for their employees’ accounts. The application prompts the user to provide one single line of text with an employee’s full name in the following format “forename surname” at a time. (Please note that you are not required to validate the input, we assume that the input is well-formed.) Next, the application uses the given full name to create the corresponding item. Note that the application should work irrespective of how the user provides the full name i.e. using upper-case letters, lower-case letters, or a combination of both upper-case and lower-case letters. You should use the full name as provided i.e. you should not modify the given full name to a different letter case. Assigned Item Rules to Create the Item Examples (given full name and corresponding item that should be created) password The password is created using the following rules: • The letters ‘a’,…
- In order to access each element in an array, the For...Next statement needs to know the highest subscript in the array. True or False?Assignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the *" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level 2. Add Platform Prompt the user to enter a starting point and length for the Re-initialize the 2D array and fill every element with the "** symbol. horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns |(or out of bounds), notify the user that this is not possible. Prompt the user to enter a column and row index. Replace that element in the 2D array…get_column_choice(): this function will allow us to ask the players which pocket they want to grab stones from. Since we know which row they are grabbing from (since it is not allowed to grab stones from your opponent’s side), we only need to get the column they want. As previously stated, we are using letters to represent the columns to make it easier on the player. This function accepts the current player (should be a 0 or 1), the board, and a list of letters (the same as the list you passed to the print_game_board function) and it will return the index of the column being chosen. The function should ask the player to enter a column letter, then it should check that the conditions listed below hold. If they don’t meet these conditions, it should ask again until it gets a valid letter, otherwise it should return the corresponding column index for that letter. Letter entered must be on the game board. It can be lower case or upper case. (Hint: this doesn’t need to be hard coded,…
- Assignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the "*" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level Re-initialize the 2D array and fill every element with the "*" symbol. 2. Add Platform Prompt the user to enter a starting point and length for the horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns (or out of bounds), notify the user that this is not possible. 3. Add Item Prompt the user to enter a column and row index. Replace that element in the…Now, add a menu that you design which includes these features: Ability for a user to input a set of grades into a vector. Make sure only integers between 0 and 100 are used. Cout the vector onto the screen with grades separated by spaces and starting with, "Original user vector: " Output the average grade. Ability to sort the user-inputted vector from low to high or high to low. Cout the new sorted vector onto the screen with grades separated by spaces and starting with, "Grades sorted vector: " Using the binary search method (not the linear search method), add the ability to find a user selected grade and change it. You May Only Use These Vector Methods: size() // Returns the number of elements empty() // Returns a boolean True if the vector is empty push_back(element) // Adds an element to the back of the vector pop_back() // Removes the element at the back of the vector front()…3. The following program loads and displays an image. Complete the draw_border function to draw a black border around the image. Don’t change the size of the image - draw 5 black lines across the top and bottom and 5 black lines down the left and right sides of the image. Do not change the main function. import image def draw_border(pic):'''Returns an image with a black border around it'''pass #You can leave this or remove it#Your code here to draw a black border around the image def main():'''Controls the program'''fname = "https://runestone.academy/runestone/static/instructorguide/_static/arch.jpg"img = image.Image(fname)width = img.getWidth()height = img.getHeight()win = image.ImageWin(width, height)draw_border(img)img.draw(win) main() #Run the program