a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach, a full bottom-up approach, or some combination. But, in any case, you should come up with a list of functions you plan to implement, each with its own clear purpose. a. Create a document that outlines all the functions you will create, including a purpose for each, stating what the function does, and any parameters it has. The purpose for each function can become its docstring b) After you have written a description of your program, including the planned functions, go ahead and write code for each function. Be sure to create a docstring for each function. Turn in your program and the design document you created beforehand. Challenge: See if you can create a program so that the lines are drawn

Answers

Answer 1

Answer:

See Explaination

Explanation:

import turtle

def drawLine(x,y,height):

'''

method to draw a vertical line from x,y with given height

'''

turtle.up()

turtle.goto(x,y)

turtle.down()

turtle.goto(x,y-height)

def drawSet(x,y,height):

'''

method to draw a full set of tally marks

'''

temp = x

#drawing 5 vertical lines

for j in range(4):

drawLine(temp,y,height)

temp+=20

#drawing a line crossing all previous lines

turtle.up()

turtle.goto(x-5,y-height/2)

turtle.down()

turtle.goto(temp-15,y-height/4)

def drawPartialSet(x,y,height,count):

'''

method to draw an incomplete set (less than 5 tally marks)

'''

temp = x

for j in range(count):

drawLine(temp,y,height)

temp+=20

#getting number

num=int(input('Enter the number: '))

#finding number of complete sets

sets=num//5

#finding number of incomplete sets

extra=num%5

#setting up turtle

turtle.setup(width=500,height=500)

turtle.pensize(5)

turtle.speed(0) #max speed

#starting x, y coordinates

x=-240

y=250

line_height=80 #height of one tally line

#drawing all complete sets

for i in range(1,sets+1):

drawSet(x,y,line_height)

x+=line_height

if i%5==0:

#moving to next line after every 5 sets

x=-240

y-=line_height+50

#drawing extra sets if exist

if extra>0:

drawPartialSet(x,y,line_height,extra)

turtle.ht() #hide turtle

turtle.done() #finish drawing


Related Questions

Consider the following functions: (4) int hidden(int num1, int num2) { if (num1 > 20) num1 = num2 / 10; else if (num2 > 20) num2 = num1 / 20; else return num1 - num2; return num1 * num2; } int compute(int one, int two) { int secret = one; for (int i = one + 1; i <= two % 2; i++) secret = secret + i * i; return secret; } What is the output of each of the following program segments? a. cout << hidden(15, 10) << endl; b. cout << compute(3, 9) << endl; c. cout << hidden(30, 20) << " " << compute(10, hidden(30, 20)) << endl; d. x = 2; y = 8; cout << compute(y, x) << endl;

Answers

Answer:

a.  cout<<hidden(15,10)<<endl;

output = 5

b. cout << compute(3, 9) << endl;

output=3

c. cout << hidden(30, 20) << " " << compute(10, hidden(30, 20)) << endl;

output = 10

d. x = 2; y = 8; cout << compute(y, x) << endl;

output= 8

Explanation:

solution a:

num1= 15;

num2= 10;

according to condition 1, num1 is not greater than 20. In condition 2, num2 is also not greater than 20.

so,

the solution is

return num1 - num2 = 15 - 10 = 5

So the output for the above function is 5.

solution b:

as in function there are two  integer type variables named as one and two. values of variables in given part are:

one = 3

two = 9

secret = one = 3

for (int i= one + 1 = 3+1 = 4; i<=9%2=1; i++ )

9%2 mean find the remainder for 9 dividing by 2 that is 1.

//  there 4 is not less than equal to  1 so loop condition will be false and loop will terminate. statement in loop will not be executed.

So the answer will be return from function compute is

return secret ;

secret = 3;

so answer return from the function is 3.

solution c:

As variables in first function are num1 and num2. the values given in part c are:

num1 = 30;

num2= 20;

According to first condition num1=30>20, So,

num1= num2/10

so the solution is

num1 = 20/10 = 2

now

num1=2

now the value return from function Hidden is,

return num1*num2 = 2* 20 = 40

Now use the value return from function hidden in function compute as

compute(10, hidden(30, 20))

as the value return from hidden(30, 20) = 40

so, compute function becomes

compute(10, 40)

Now variable in compute function are named as one and two, so the values are

one= 10;

two = 40;

as

secret = one

so

secret = 10;

for (int i= one + 1 = 10+1 = 11; i<=40%2=0; i++ )

40%2 mean find the remainder for 40 dividing by 2 that is 0.

//  there 11 is not less than equal to  0 so loop condition will be false and loop will terminate. statement in loop will not be executed.

So the answer will be return from function compute is

return secret ;

secret = 10;

so answer return from the function is 10.

solution d:

Now variable in compute function are named as one and two, so the values are

one = y = 8

two = x = 2

There

Secret = one = 8;

So

for (int i= one + 1 = 8+1 = 9; i<=2%2=0; i++ )

2%2 mean find the remainder for 2 dividing by 2 that is 0.

//  there 9 is not less than equal to  0 so loop condition will be false and loop will terminate. statement in loop will not be executed.

So the answer will be return from function compute is

return secret ;

secret = 8;

so answer return from the function is 8.

20 POINTS
You put an image on instagram while at a football game, what type of digital footprint would this be?
A) explicit
B) implicit

Answers

It’s option B implicit

A Grocery store has 184 shelves for bottled goods. Each shelf can hold 27 bottles. How many bottles will the shelves hold in all.

Answers

Answer:

4,968

Explanation:

You just have to multiply

All you have to do is multiply 184 and 27 and the answer is: 4,968

The students assume the role of a networking intern at Richman Investments, a mid-level financial investment and consulting firm. In this assignment, the students will research malicious code attacks and select one that occurred within the last year. They must write a summary report explaining what kind of malicious attack it was, how it spread and attacked other devices, and how it was mitigated. They must also explain how they would prevent the attack from recurring on a network under their control.

Answers

Answer:

Malicious code: Trojan

Explanation:

Trojan

A Trojan is malicious code that, unlike viruses and worms, cannot reproduce itself and infect files. It is usually in the form of an executable file (.exe, .com) and does not contain any other elements, except for the Trojan's own code. For this reason the only solution is to remove it.

It has several functions -from acting as keyloggers (connecting and transmitting the actions performed on the keyboard) and deleting files to formatting disks. Some contain special functionality that installs Trojan programs, a client-server application that guarantees the developer remote access to your computer. Unlike many (legitimate) programs with similar functions, they are installed without user consent.

Answer:

Malicious code : Spyware

Explanation:

The kind of malicious attack on the the intern in making a research on is Spyware

Spyware gathers information about a users and it activities without them knowing and also without their permission or consent. Type of user information we talking about here are pins, passwords, unstructured messages and payment information.

Spyware attack does only affect desktop browser, it also operate on different platform like a mobile phone having a critical application.

How to prevent spyware.

1.Update your system. Make sure you update your browser and device often.

Give attention to the type of things you download.

2. Using anti-spyware software. The software is the obstruction between you and an attacker.

3. Always be watching your email

4.Always avoid pop-ups.

The function below takes one parameter: a list of numbers (number_list). Complete the function to count how many of the numbers in the list are greater than 100. The recommended approach for this: (1) create a variable to hold the current count and initialize it to zero, (2) use a for loop to process each element of the list, adding one to your current count if it fits the criteria, (3) return the count at the end.

Answers

Answer:

#include<iostream>

#include<conio.h>

using namespace std;

main()

{

int n;

cout<<"enter the size of array"<<endl;

cin>>n;

int a[n],count=0;

 

 

for (int i=0;i<n;i++)

{

 cout<<"\nenter the values in array"<<i<<"=";

 cin>>a[i];  

}

 

for (int j=0;j<n;j++)

{

 if (a[j]>=100)

 {

  count=count+1;

 }

}

cout<<"Total Values greater than 100 are ="<<count;

getch();

}

Explanation:

In this program, an array named as 'a' has been taken as integer data type. The array haves variable size, user can change the size of array as per need or demand.

Values will be inserted by user during run time. This program will check that how many values are greater than and equal to 100 in array. The number of times 100 or greater value will appear in array, it count the value in variable "count". After complete traversal of array the result will shown on output in terms of total number of count of value greater than or equal to 100.

Modify the program so that it can do any prescribed number of multiplication operations (at least up to 25 pairs). The program should have the user first indicate how many operations will be done, then it requests each number needed for the operations. When complete, the program should then return "done running" after displaying the results of all the operations in order. It is in the Arduino Language

You can write the code from scratch if you'd like without modifying the given code. In any expected output.

//Initializing the data
float num1 = 0;
float num2 = 0;
int flag1 = 0;

// a string to hold incoming data
String inputString = " ";
// Whether the string is Complete
boolean stringComplete = false;
//This is where the void setup begins
void setup() {
//Initializing the serial
Serial.begin (9600);
//Reserving 200 bytes for the inputString
inputString.reserve (200);
Serial.println("Provide The First Number");
}

void loop() {
//Print the string when the new line arrives
if (stringComplete) {
if (flag1 == 0) {
Serial.println(inputString);
num1 = inputString.toFloat( );
flag1 = 1;
//Asking the user to input their second string
Serial.println("Provide The Second Number");
}
else if (flag1 == 1) {
Serial.println(inputString);
num2 = inputString.toFloat( );
flag1 = 2;
Serial.println("The Product is Calculating...");
}
if (flag1 == 2) {
Serial.println("The Product is: ");
Serial.println(num1*num2);
Serial.println("Press Reset");
flag1 = 5;
}
//This clears the string
inputString = " ";
stringComplete = false;
}
}

void serialEvent() {
while (Serial.available( )) {
// get the new byte
char inChar = (char)Serial.read( );
//add it to the inputString
inputString += inChar;
//if the incoming character is a newline, set a flag so the main loop can
//do something about it

if (inChar == '\n') {
stringComplete = true;
}
}
}

Answers

Final answer:

The provided Arduino program was modified to allow user input for the total number of multiplication operations. It prompts the user, performs each multiplication as numbers are input, and outputs results immediately after each operation, indicating completion with 'Done running.'

Explanation:

The student is working with a program written in the Arduino programming language, which involves performing multiple multiplication operations. To modify the program to handle a user-specified number of operations, we need to include a loop and some condition checks to process multiple pairs of numbers. Below is an example sketch that allows the user to specify the number of multiplication operations to perform, input each pair of numbers, and then output the results in order:

int numOperations = 0;
int count = 0;
float result;

void setup() {
 Serial.begin(9600);
 Serial.println("Enter the number of multiplication operations:");
}

void loop() {
 if (Serial.available() > 0) {
   if (numOperations == 0) {
     numOperations = Serial.parseInt();
     Serial.println("Now enter pairs of numbers to multiply:");
   } else if (count < numOperations * 2) {
     float num = Serial.parseFloat();
     if (count % 2 == 0) {
       result = num;
     } else {
       result *= num;
       Serial.print("Result ");
       Serial.print((count / 2) + 1);
       Serial.print(": ");
       Serial.println(result);
       if ((count / 2) + 1 == numOperations) {
         Serial.println("Done running.");
       }
     }
     count++;
   }
 }
}
This code replaces the existing loop and setup functions. It first prompts the user for the total number of operations and then reads the pairs of numbers from the serial input, calculates the product, and outputs the result immediately after each pair is entered. When all operations are complete, it prints "Done running." to the serial monitor.

The history teacher at your school needs help in grading a True/False test. The students’ IDs and test answers are stored in a file. The first entry in the file contains answers to the test in the form: TFFTFFTTTTFFTFTFTFTT Every other entry in the file is the student ID, followed by a blank, followed by the student’s responses. For example, the entry: ABC54301 TFTFTFTT TFTFTFFTTFT indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and so on. This student did not answer question 9. The exam has 20 questions, and the class has more than 150 students. Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points. Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed by the test score, followed by the test grade. Assume the following grade scale: 90%–100%, A; 80%–89.99%, B; 70%–79.99%, C; 60%–69.99%, D; and 0%–59.99%, F.

Answers

This program assumes that the test data file is formatted as described in your question.

def calculate_score(answers, student_answers):

   score = 0

   for i in range(len(answers)):

       if student_answers[i] == answers[i]:

           score += 2

       elif student_answers[i] != ' ':

           score -= 1

   return max(0, score)  # Ensure the score is not negative

def calculate_grade(score, total_questions):

   percentage = (score / (2 * total_questions)) * 100

   if 90 <= percentage <= 100:

       return 'A'

   elif 80 <= percentage < 90:

       return 'B'

   elif 70 <= percentage < 80:

       return 'C'

   elif 60 <= percentage < 70:

       return 'D'

   else:

       return 'F'

def process_test_data(file_path):

   with open(file_path, 'r') as file:

       data = file.read().split()

   answers = data[0]

   student_data = data[1:]

   total_questions = len(answers)

   

This response explains how to programmatically grade a True/False test, including reading answers from a file, calculating scores, and assigning grades based on a percentage scale. An example Python code snippet illustrates the process. The final output displays each student's ID, their answers, score, and grade.

You can write a program to help your history teacher grade the True/False test. Here's a step-by-step approach:

Read the test answers and student responses from the file.The first entry contains the correct answers, the subsequent entries contain student IDs and their responses.For each student, calculate the test score based on the given rules: each correct answer gets 2 points, each wrong answer deducts 1 point, and no answer gets 0 points.Calculate the percentage score and determine the letter grade using the given scale.Output the student ID, responses, test score, and grade.

Example Code:

def grade_test(filename):
   with open(filename, 'r') as file:
       lines = file.readlines()
   correct_answers = lines[0].strip()
   results = {}  # Stores the final results
   for line in lines[1:]:
       parts = line.strip().split()
       if len(parts) < 2:
           continue  # Skip malformed lines
       student_id = parts[0]
       student_answers = parts[1]
       score = 0
       for i, answer in enumerate(student_answers):
           if i >= len(correct_answers):
               break  # Ignore answers beyond the number of correct answers
           if answer == correct_answers[i]:
               score += 2
           elif answer == ' ':
               continue
           else:
               score -= 1
       percentage = (score / (2 * len(correct_answers))) * 100
       if percentage >= 90:
           grade = 'A'
       elif percentage >= 80:
           grade = 'B'
       elif percentage >= 70:
           grade = 'C'
       elif percentage >= 60:
           grade = 'D'
       else:
           grade = 'F'
       results[student_id] = {'answers': student_answers, 'score': score, 'grade': grade}
   for student_id, result in results.items():
       print(f"{student_id} {result['answers']} {result['score']} {result['grade']}")

# Use the function by specifying the file name
grade_test('test_answers.txt')

This program will read from a file called 'test_answers.txt' and output each student's ID, their answers, score, and grade.

Which of the following is true about open-source enterprise resource planning (ERP) system software? a. An open-source ERP system software’s source code can be modified easily. b. An open-source ERP system software’s source code is not flexible enough to adapt it for changing business needs. c. An open-source ERP system software’s source code is too complex to be modified. d. An open-source ERP system software’s source code is not visible to users.

Answers

Answer:

a. An open-source ERP system software’s source code can be modified easily.

Explanation:

Open source software is the software that is available for modification by any one easily. These software are available publicly for the purpose of modifications. User can modify these software as their requirements. There are different software available for enterprise resource planing. Different users and companies use this software freely and modify them for their company according to the demand and need.

Tryton, Odoo and ERPNext are the examples of some open source enterprise resource planning (ERP) software. These software are available for free to modify their source code and use according to the need of the company. As the main advantage of these software is they are available and modifiable easily.

1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sidebar, use the title attribute for each link to build the name of the JSON file that needs to be retrieved. Then, use that name to get the data for the speaker, enclose that data in HTML elements that are just like the ones that are used in the starting HTML for the first speaker, and put those elements in the main element in the HTML. That way, the CSS will work the same for the Ajax data as it did for the starting HTML. 2. Don’t forget to clear the elements from the main element before you put the new Ajax data in that element. 3. Verify there are no errors.

Answers

Answer:

Kindly note that the codes below must be executed through any server like apache, xampp, ngnix, etc...

Explanation:

Other files are not changed... only speakers.js modified

speakers.js

$(document).ready(function() {

   $("#nav_list li").click(function() {

       var title = $(this).children("a").attr("title");

       $.get(title + ".json", function(data, status) {

        data = data['speakers'][0];

  $("main h1").html(data['title']);

  $("main h2").html(data['month']+"<br />"+data['speaker']);

  $("main img").attr("src", data.image);

  $("main p").html(data.text);

       });

   });

});

You must keep track of some data. Your options are: (1) A linked-list maintained in sorted order. (2) A linked-list of unsorted records. (3) A binary search tree. (4) An array-based list maintained in sorted order. (5) An array-based list of unsorted records

Answers

(a) For sorted records, use an array-based sorted list for efficient O(log n) inserts and searches. Linked lists are less optimal.

(b) With random distribution, opt for a balanced binary search tree for O(log n) insertions and searches. Arrays may lack balance.

(a) For the scenario where records are guaranteed to arrive already sorted from lowest to highest, an array-based list maintained in sorted order (Option 4) would be the most efficient choice. This is because inserting into a sorted array is a relatively quick operation, and with records arriving in sorted order, each insert operation can be performed with a time complexity of O(log n), making it efficient. The subsequent searches would also benefit from the sorted order, allowing for a binary search with a time complexity of O(log n), resulting in optimal performance. Linked lists, whether sorted or unsorted, may not provide the same level of efficiency in this context.

(b) In the case where records arrive with values having a uniform random distribution, a binary search tree (Option 3) is a suitable choice. A well-balanced BST can provide an average-case time complexity of O(log n) for both insertions and searches. The random distribution of values helps maintain the balance of the tree, ensuring that the height is minimized. On the other hand, array-based options, even if sorted, may not guarantee a balanced structure, and linked lists may lead to linear search times in the worst case.

The question probable may be:

You must keep track of some data. Your options are:

(1) A linked-list maintained in sorted order.

(2) A linked-list of unsorted records.

(3) A binary search tree.

(4) An array-based list maintained in sorted order.

(5) An array-based list of unsorted records.

For each of the following scenarios, which of these choices would be best? Explain your answer.

(a) The records are guaranteed to arrive already sorted from lowest to highest (i.e., whenever a record is inserted, its key value will always be greater than that of the last record inserted). A total of 1000 inserts will be interspersed with 1000 searches.

(b) The records arrive with values having a uniform random distribution (so the BST is likely to be well balanced). 1,000,000 insertions are performed, followed by 10 searches.

Write the Python code to implement each step of the following algorithm. Your code should use descriptive variable names and perform all of the calculations necessary using the variables you define. You should not manually perform any calculation.

Answers

Answer:

# the number of pizza is initialised

# to 5

number_of_pizza = 5

# number of slice in each pizza

# is initialised to 8

slice_in_each_pizza = 8

# total number of pizza is calculated

total_number_of_slices = number_of_pizza * slice_in_each_pizza

# number of guest who respond yes

# is initialised to 10

number_of_guest_respond_yes = 10

# additional 3 guest is added to existing guest

number_of_guest_respond_yes += 3

# number of left over slice is gotten by using modulo arithmetic

number_of_left_over_slice = total_number_of_slices % number_of_guest_respond_yes

# the number of left over slice

# is printed which is 1

print(number_of_left_over_slice)

Explanation:

Missing Question Part: Use a variable to store the number of pizzas ordered as 5.

Assuming there are 8 slices in each pizza, use a variable to store the total number of slices calculated using the number of pizzas ordered.

Use another variable to store the number of guests who had responded YES as 10.

Three more people responded YES. Update the corresponding variable using an appropriate expression.

Based on the guest count, set up an expression to determine the number of left-over slices if the slices would be evenly distributed among the guests. Store the result of the expression in a variable.

The program is written in Python and it is well commented.

Express the worst case run time of these pseudo-code functions as summations. You do not need to simplify the summations. a) function(A[1...n] a linked-list of n integers) for int i from 1 to n find and remove the minimum integer in A endfor endfunction

Answers

Answer:

The answer is "O(n2)"

Explanation:

The worst case is the method that requires so many steps if possible with compiled code sized n. It means the case is also the feature, that achieves an average amount of steps in n component entry information.

In the given code, The total of n integers lists is O(n), which is used in finding complexity. Therefore, O(n)+O(n-1)+ .... +O(1)=O(n2) will also be a general complexity throughout the search and deletion of n minimum elements from the list.

10. Consider sending a 3000-byte IPv4 datagram into a link that has an MTU of 700 bytes. Suppose the original datagram is stamped with the identification number 1001. Assume that all IP datagram headers have a size of 20 bytes. How many fragmented datagrams will be generated? For *each* of the fragmented datagrams, please give: the identification number of the fragmented datagram, the value in the offset field of the datagram header, the length of the fragmented datagram, and the length of the payload in the fragmented datagram.

Answers

Answer:

Number of fragmented datagrams: 5

Explanation:

Since the MTU is 700 bytes,the payload will be 680 bytes and Up header will be 20 bytes.

The datagram is of size 3000 bytes. Therefore this datagram is fragmented to send it in 700 bytes MTU.

The first four fragments has the size 680 bytes of payload(4*680= 2720 bytes). The remaining 280 bytes will be sent in the 5th fragment.

The offset value gives how much was sent before the current fragment in terms of 8-byte blocks.

For first fragment it will be 0, as no data was sent before this first fragment.

For second fragment, 680 bytes(680/8=85 8-bytes block) were sent in first fragment before this current fragment. Hence the value will be 0+85=85.

For third fragment it is : 0+85+85=170

Number of fragmented datagrams: 5

You will implement three different types of FFs with two different reset types. You have to show your results on your FPGA. You have to use behavioral verilog. Steps: 1. Build a positive edge triggered TFF. 2. Add a synchronous reset to TFF. a. The reset signal should be attached to a button when you load JTAG. 3. Using a separate piece of code: Add an asynchronous reset to TFF. a. Copy and reuse your old code with some modifications.

Answers

Answer:

Step 1 : For TFF with asynchronous reset, the verilog code is :

'timescale 1ns/100ps

module tff1( input t,clk,reset, output reg q );

if (reset ) begin

always at (posedge clk ) begin

q <= #4 not q;

end

end else begin

q <= 1'b0;

end

end module

Step 2 : For TFF with synchronous reset, just include reset condition inside always statement as shown :

always at(posedge clk ) begin

if ( reset ) then

q <= #4 not q;

end else begin

q <= 1,b0'

end

end

Step 3 : For developing a DFF from a TFF , you need to have a feedback loop from ouput to input . Make sure you assign the wires correctly including the signal direction . Combine both the input D and ouptut of TFF using XOR and input it to the T.

module dff (input d, clk , reset ,output reg q )

wire q;

reg t;

tff1 ( t, clk, reset , q ); //module instantiation

xor ( t,q,d);

end module

For synchronous reset , you can just replace the tff asynchronous module with synchronous module

Step 4 : For obtaining JK FF using the DFF , we just to config the 4x1 MUX such that the required output is generated

module JKFF ( input j,k ,clk, reset , output reg q)

DFF ( d ,clk, reset ,q )

reg d;

case (j,k)

when "00" then d <= q;

when "01" then d <= 1'b0;

when "10" then d <= 1'b1;

when "11" then d <= #4 not d;

default : d <= 1'bX;

end module;

The information system used by Caesar's Entertainment, which combines data from internal TPS with information from financial systems and external sources to deliver reports such as profit-loss statements and impact analyses, is an example of DSS. ESS. CDSS. MIS.

Answers

Answer:

ESS

Explanation:

Employee self-service (ESS) is a widely used human resources technology that enables employees to perform any job-related functions, such as applying for reimbursement, updating personal information and accessing company benefits information -- which was once largely paper-based, or otherwise would have been maintained by management or administrative staff.

Employee self-service is often available through the employer's intranet or portal. It can also be part of larger human capital management (HCM), enterprise resource planning (ERP) or benefits administration software, which is often delivered via SaaS platforms. Employee self-service software, once sold as a stand-alone product, is now usually incorporated into more comprehensive HR tech systems.

Employee self-service systems are being optimized for mobile more and more on social media-like platforms, and are often part of larger employee engagement strategies, which can include wellness programs, recognition, learning management systems and organization-wide social activities.

Programming Project 6: GUI program

Last program assignment.

You need to create the Graphical User Interface program that allows a user to select their lunch items and have the program calculate the total. Use tkinter to produce a form that looks much like the following. It doesn't need to look exactly like this, but the drinks should all be in a row, the entrees should all be in a row, the desserts should all be in a row, and the 2 buttons should all be in a row. Use the grid layout manager to make all this happen.

Because of the radio buttons, in the program the user can select only one drink. For the entrees and desserts, any combination of selections is possible. Perfect alignment is not a requirement.

For full credit:

Use a class that inherits from Frame to implement your program.
Your program should display all the labels as shown in the image.
the drinks should be radio buttons, all on a row, the other items should be checkboxes in their respective rows.
The correct total rounded to 2 decimal places should appear in the total entry box only when the Calculate Total button is clicked, and the Clear Form button should put the form back into its default state, as shown in the image above..
Arrange the widgets more or less a shown above. I recommend using the grid layout manager for this. .
Here is a possible program run. Oh, and it would help a little if you spelled Total correctly.

Answers

Answer:

Explanation:

So i have issues typing it here, because it keeps saying trouble uploading your answer as a result of inappropriate words/links, so i will just make a screenshot of it.......

Just save the the above code in python file and execute it, you should arrive at your answer.

Attached below is the code and sample screenshot of what you should expect

cheers !!!!

You client has stipulated that open-source software is to be used. Is this a functional or non-functional requirement? How early in the life-cycle model can this requirement be handled? Explain your answer.

Answers

Answer:

In the beginning of the model

Explanation:

This is believed to be a non functional requirement because the non- functional type of requirement as platform restrictions, reliability and time of response. These requirements are meant to be handled during the beginning of the life cycle model because all planing and analysis should be centered around the fact that customers desires to adopt the open source model.

Recall that two strings u and v are ANAGRAMS if the letters of one can be rearranged to form the other, or, equivalently, if they contain the same number of each letter. If L is a language, we define its ANAGRAM CLOSURE AC(L) to be the set of all strings that have an anagram in L. Prove that the set of regular languages is _not_ closed under this operation. That is, find a regular language L such that AC(L) is not regular. (We’re now allowed to use Kleene’s Theorem, so you just need to show that AC(L) is not recognizable.)

Answers

Final answer:

We use a non-regular language, L = {a^n b^n | n ≥ 0}, to demonstrate by contradiction that the anagram closure AC(L) including strings with any order of 'a's and 'b's cannot be recognized by a finite automaton, proving that the set of regular languages is not closed under the operation of forming an anagram closure.

Explanation:

To prove that the set of regular languages is not closed under the operation of forming the anagram closure (AC), let us consider a simple regular language L over some alphabet Σ such that L = {anbn | n ≥ 0}. Although this definition of language L leads to a non-regular language, it is routinely used in theoretical computer science as a starting point to demonstrate properties of language classes. For the sake of argument, we are considering the set of strings where the number of 'a's is equal to the number of 'b's, and for our purposes, this forms our regular language L.

The anagram closure of L, AC(L), would include all strings with equal numbers of 'a's and 'b's regardless of order. However, if we consider languages recognizable by finite automata, which are a characterization of regular languages due to Kleene's Theorem, we realize that a finite automaton cannot keep count of an unbounded number of characters, and thus cannot recognize a language that has an unbounded interchangeable ordering of 'a's and 'b's with equality. This makes AC(L) non-regular because a finite state machine cannot handle the counting necessary for validating anagrams in this context.

Therefore, since AC(L) is not recognizable by a finite automaton, it follows that the set of regular languages is not closed under the operation of taking an anagram closure, and we have our proof by contradiction.

Write a predicate function called check_list that accepts a list of integers as an argument and returns True if at least half of the values in the list are less than the first number in the list. Return False otherwise.

Answers

Answer:

# the function check_list is defined

# it takes a parameter

def check_list(integers):

# length of half the list is assigned

# to length_of_half_list

length_of_half_list = len(integers) / 2

# zero is assigned to counter

# the counter keep track of

# elements whose value is less

# than the first element in the list

counter = 0

# the first element in list is

# assigned to index

index = integers[0]

# for loop that goes through the

# list and increment counter

# whenever an element is less

# than the index

for i in range(len(integers)):

if integers[i] < index:

counter += 1

# if statement that returns True

# if counter is greater than half

# length of the list else it will return

# False

if counter > length_of_half_list:

return True

else:

return False

# the function is called with a

# sample list and it returns True

print(check_list([5, 6, 6, 1, 9, 2, 3, 4, 1, 2, 3, 1, 7]))

Explanation:

The program is written is Python and is well commented.

The example use returns True because the number of elements with value less than 5 are more than half the length of the list.

Why is it a good idea for the DBMS to update the catalog automatically when a change is made in the database structure? Could users cause problems by updating the catalog themselves? Explain

Answers

Answer:

Explanation:

A catalog is a directory where information about the location of file or database is stored

(a) It is good for DBMS to upgrade the catalog automatically when there is a change in the database structure.

It has the following benefits;

- The updated form of the database can be made available and accessible to other users

- The data of the database will remain in a stable and consistent state

- There will not be a need to execute the update query to update the database.

-If there is no update automatically, only users that made changes will be able to have access to the database

(b) Yes, users can cause problems by up dating the catalog manually.

The following will be the disadvantage when the catalog is updated by users;

- Updated database will not be seen until the user update manually by themselves

- Persistence and consistency of problems

Answer:

The catalog is defined as a directory in which the information about the database is stored. This catalog contains information about the location of any file or database. That DBMS update its catalog automatically when any change in the database is made is a good choice, since any user could enter and consult either a file or a database that is kept updated. If DBMS does not automatically update the database, only users who make any modifications to that database will be able to access that updated information, this would be a typical inconvenience if users update the catalog manually.

Explanation:

Sam has worked for a project-based firm for five years. After being assigned to a high profile special project, he realized that he needed a quiet environment that was free from distractions to finalize project files on a daily basis. His project supervisor agreed and approved for Sam to telecommute from his home. The organization furnished Sam with a standard PC laptop and upgrades to the business class DSL modem. Sam must upload all completed project files to a secured server at the end of each business day, plus maintain a backup copy on his tower unit.

Required:
a. What firewall configuration would you recommend for Sam's home-based office/network? Justify your response.
b. What firewall setup would provide the firm both flexibility and security? Justify your response.
c. Which firewall technologies should be deployed

i. to secure the internet-facing web servers.
ii. to protect the link between the web servers and customer database.
iii. to protect the link between internal users and the customer database?

Answers

Answer:

a. Packet filter gateway

b. The dynamic firewall

c. I. Proxy firewall. ii. Application firewall iii. Circuit level gateway

Explanation:

A. The packet filter gateway firewall is the recommended firewall off Sam operation from home. This is because it operates at the network OSI model level where it filter all unwanted packet and content across the home/ office network

B. The dynamic firewall or the stateful packet filter operates changeably without distorting the security of the network. Hence it is the most ideal that provides flexibility and security.

C. I. The proxy firewall is a technology that provides security between the internet to web server

ii. Application firewall technologies take care of the link between web server and customer database.

iii. The circuit level gateways ensure that the link between internal users and customer database are secured.

TVBCA has just occupied an old historic building in downtown Pittsburgh in which 15 employees will work.
Because of historic building codes, TVBCA is not permitted to run cables inside walls or ceilings.
Required results:
Employees must be able to share files and printers as in a typical LAN environment without the use of cables.
Optional desired results:
Employees must be able to use their laptops and move freely throughout the office while maintaing a network connection.
Because of the size of some computer-aided design (CAD) files employees use frequently, data transfer speeds should be more than 20Mbps.
Proposed Solution:
Install an 802.11a wireless access point and configure each computer and laptop with a wireless network card.
1. Which results does the proposed soulution deliver?
Explain your answer.
a. The proposed solution delivers the required result and both optional desired results.
b. The proposed solution delivers the required result and only one of the two optional desired results.
c. The proposed solution delivers the required result but neither optional desired result.
d. The proposed solution does not deliver the required result.

Answers

Answer:

A. The proposed solution delivers the required result and both optional desired results.

Explanation:

The IEEE 802.11a is the standard code of the wireless communication technology known as WIFI, it is wireless as it requires no cable to connect to a network device. The data transmission rate of the IEEE 802.11a is 1.5 - 54Mbps (mega bit per second). So, the employees in the TVBCA building can wireless connect to the network, which allows them to be mobile and they can also send large CAD files among themselves.

Write a program that prints the block letter “B” in a 7x7 grid of stars like this:
*****
* *
* *
*****
* *
* *
*****
Then extend your program to print the first letter of your last name as a block letter in a 7X7 grid of stars.

Answers

Answer:

output = "" for i in range(7):    if(i % 3 == 0):        for i in range(5):            output+= "*"        output += "\n"    else:        for i in range(2):            output += "* "        output += "\n" print(output)

Explanation:

The solution code is written in Python 3.

Firstly, create a output variable that holds an empty string (Line 1).

Create an outer loop that will loop over 7 times to print seven rows of stars (Line 2). In row 0, 3 and 6 (which are divisible by 3) will accumulate up to 5 stars using an inner loop (Line 4-5) whereas the rest of the row will only print two stars with each start followed by a single space (Line 8-9) using another inner loop.

At last, print the output (Line 12).  

Write a function findWithinThreshold that identifies the elements of a given array that are inside a threshold value. Takes the following as input arguments/parameters : an integer array argSource that brings in the values that need to be examined. an integer that gives the size of the array argSource. an integer that gives the threshold value argThreshold. an integer array argTarget whose contents are to be filled by this function with elements from argSource that are less than argThreshold an integer argTargetCount that has been passed by reference to the function findWithinThreshold (this value needs to be filled by this function bas

Answers

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

/* Type your code for the function findWithinThreshold here. */

void findWithinThreshold(int argSource[], int argsSourseSize, int argThreshold, int argTarget[], int &argsTargetSize)

{

argsTargetSize = 0;

for (int i = 0; i < argsSourseSize; i++)

{

if (argSource[i] <= argThreshold)

argTarget[argsTargetSize++] = argSource[i];

}

}

/* Type your code for the function findWithinLimits here. */

void findWithinLimits(int argSource[], int argsSourseSize, int argLowLimit, int argHighLimit,int argTarget[],int &argTargetCount)

{

argTargetCount = 0;

for (int i = 0; i < argsSourseSize; i++)

{

if (argSource[i]>=argLowLimit && argSource[i] <= argHighLimit)

argTarget[argTargetCount++] = argSource[i];

}

}

int main() {

const int MAX_SIZE = 100;

int source[MAX_SIZE]; //integer array source can have MAX_SIZE elements inside it ;

// user may chose to use only a portion of it

// ask the user how many elements are going to be in source array and

// then run a loop to get that many elements and store inside the array source

int n;

cout << "How many elements: ";

cin >> n;

for (int i = 0; i < n; i++)

{

cout << "Enter " << (i + 1) << " element: ";

cin >> source[i];

}

int threshold, lower_limit, upper_limit;

/* Type your code to declare space for other required data like

target array (think how big it should be)

threshold

lower limit

upper limits

as well as the variable that will bring back the info regarding how many elements might be in target array

*/

int *target = new int[n];

int targetCount;

cout << "\nEnter thresold value: ";

cin >> threshold;

/* Type your code to get appropriate inputs from the user */

cout << "\nEnter lower limit: ";

cin >> lower_limit;

cout << "\nEnter upper limit: ";

cin >> upper_limit;

/* Type your code here to call/invoke the function findWithinThreshold here.. */

/* Type your code to print the info in target array - use a loop and think about how many elements will be there to print */

findWithinThreshold(source, n, threshold, target, targetCount);

cout << "\nElement in the threshold = " << targetCount << endl;

for (int i = 0; i < targetCount; i++)

cout << target[i] << "\n";

/* Type your code here to call/invoke the function findWithinLimits here.. */

/* Type your code to print the info in target array - use a loop and think about how many elements will be there to print */

findWithinLimits(source, n, lower_limit, upper_limit, target, targetCount);

cout << "\n\nElements with in the " << lower_limit << " and "<<upper_limit<<endl;

for (int i = 0; i < targetCount; i++)

cout << target[i] << " ";

cout << endl;

system("pause");

return 0;

}

The function findWithinThreshold identifies elements in an array less than a given threshold. It takes four parameters and outputs the target array and count of elements below the threshold. Sample C++ code is provided for implementation.

Function to Identify Elements within a Threshold :

To solve this problem, you need to write a function findWithinThreshold that identifies elements in an array which are less than a given threshold. The function takes four parameters:

argSource: The input integer array to be examined.argSize: The size of the input array.argThreshold: The threshold value.argTarget: The output integer array to be filled with elements from argSource less than argThreshold.argTargetCount: A reference integer that will hold the count of elements in argTarget.

Here's a sample implementation in C++:

void findWithinThreshold(int argSource[], int argSize, int argThreshold, int argTarget[], int& argTargetCount) {
   argTargetCount = 0;
   for (int i = 0; i < argSize; i++) {
       if (argSource[i] < argThreshold) {
           argTarget[argTargetCount] = argSource[i];
           argTargetCount++;
       }
   }
}

In this function, argTargetCount is set to 0 initially, and for each element in argSource that is less than argThreshold, the element is added to argTarget and argTargetCount is incremented.

ABC software company is to develop software for effective counseling for allotment of engineering seats for students with high scores ranking from top colleges. The product has to be upgraded if the common entrance score is to be considered.

Describe the appropriate product development life cycle and the standard skills required.

Answers

Answer:

A series of update steps must be done in the required software; for example:

Explanation:

Option 1: add the timestamp at the top of the view :

Open a workbook containing the dashboard in Tableau Desktop, then go to the sheet where you want to show the time of the last data update.

-Select Worksheet> Show Title.

-Double-click on the title.

-In the Edit Title dialog box, select Insert> Data update time, and then click OK.

-Add any field to the filter shelf, leave all other selections blank, and click OK.

-Save the changes.

-Add sheet to dashboard.

Option 2: add the timestamp at the bottom of the view.

Open a workbook containing the dashboard in Tableau Desktop, then go to the sheet where you want to show the time of the last data update.

-Select Worksheet> Show Caption.

-Double-click the subtitle.

-In the Edit Subtitle dialog box, select Insert> Data update time, and then click OK.

-Add any field to the filter shelf, leave all other selections blank, and click OK.

-Save the changes.

-Add the sheet to the dashboard.

-Right-click on the sheet and select Caption to display the update time.

You can modify the size of these sheets in the dashboard to take up the space you consider necessary. They can also be set as floating objects, so they don't alter the size of the rest of the sheets in the view.

Consider the three major Vs as Volume, Velocity and Variety along with other Big Data contexts. Match the terms with the short scenarios or frameworks, related to Big Data. A Big Data application that handles very large-sized block of data (64 MB). Variability Big Data, applied to collect data on visitors purchase behavior in a theme park. MapReduce Health systems transmit electronic prescriptions and receive 'no-pickup' messages. Feedback loop processing Sentiment analysis determines if a statement conveys a positive or negative attitude. Volume, Velocity, Variety Programming model to process large data sets in a parallel, distributed manner. Hadoop

Answers

Answer:

See explaination

Explanation:

(MapReduce) = Programming Model

(Variability) = Sentiment analysis

(Feedback Loop Processing) = Health Systems transit

(volume, velocity, variety) = Big Data, applied to collect data

(Hadoop) = A Big Data Application that handles very large-sized block of data.

The function below takes two parameters: a string parameter: CSV_string and an integer index. This string parameter will hold a comma-separated collection of integers: '111,22,3333,4'. Complete the function to return the indexth value (counting from zero) from the comma-separated values as an integer. For example, your code should return 3333 (not '3333') if the example string is provided with an index value of 2. Hint: you should consider using the split() method and the int() function.

Answers

Final answer:

To return the integer at a given index from a comma-separated string, split the string into a list and then convert the desired element to an integer.

Explanation:

To obtain the indexth value from a comma-separated string of integers, you can use the split() method to create a list of substrings, then use the int() function to convert the desired element to an integer. Here's an example of how you could write such a function:

def get_index_value(CSV_string, index):
   # Split the string into a list using the comma as a separator
   elements = CSV_string.split(",")
   # Convert the string at the given index to an integer
   return int(elements[index])
If you call this function with the example string '111,22,3333,4' and the index 2, it will return the integer 3333.

Write a Python function isPrime(number) that determines if the integer argument number is prime or not. The function will return a boolean True or False. Next, write a function HowManyPrimes(P), that takes an integer P as argument and returns the number of prime numbers whose value is less than P. And then write a function HighestPrime(K) that takes integer K as an argument and returns the highest prime that is less than or equal to K.

Answers

Answer:

def test_prime(n):

   if (n==1):

       return False

   elif (n==2):

       return True;

   else:

       for x in range(2,n):

           if(n % x==0):

               return False

       return True              

print(test_prime(9))

Final answer:

The Python functions isPrime(number), HowManyPrimes(P), and HighestPrime(K) are used to check if a number is prime, count how many prime numbers are less than P, and find the highest prime number — respectively.

Explanation:

To determine if an integer number is prime, you can write a Python function isPrime(number). A simple way to do this is to check whether the number has any divisors other than 1 and itself. Here's a possible implementation:

def isPrime(number):
   if number <= 1:
       return False
   for i in range(2, int(number**0.5) + 1):
       if number % i == 0:
           return False
   return True

The function HowManyPrimes(P) can be written to count the number of prime numbers less than an integer P. Here is a function that uses isPrime to do that:

def HowManyPrimes(P):
   count = 0
   for number in range(2, P):
       if isPrime(number):
           count += 1
   return count

To find the highest prime number that is less than or equal to a given integer K, you can create the function HighestPrime(K):

def HighestPrime(K):
   for number in range(K, 1, -1):
       if isPrime(number):
           return number
   return None

Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the input number as an argument and returns the estimate of its square root. The script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key.

Answers

Final answer:

The question is about creating a programming function named newton that utilizes Newton's method for an efficient approximation of square roots without solving for quadratic equation roots. The function is applicable in various mathematical scenarios, particularly where manual computation is required, such as in equilibrium problems.

Explanation:

The student's question relates to the programming of a function called newton that implements Newton's method for approximating square roots. The method is a mathematical approach that allows for expedient calculations by avoiding the need to solve for the roots of a quadratic equation. Newton's method is particularly useful in situations where square roots need to be computed manually or understood conceptually, such as in some equilibrium problems in chemistry or physics. By creating a function and utilizing a loop, users can repeatedly input numbers and receive an estimate of the square root until the enter/return key is pressed.

In the context of programming, it can be wrapped in a function to allow for repeated efficient calculation of the square root of any positive number. The square root function is fundamental in handling various mathematical computations like in equilibrium problems or any scenario where roots need to be analyzed for a final answer. Also, understanding the approximate square root computation is beneficial for students working without a calculator or aiming to grasp the underpinning principles of square roots and exponents, as indicated by √x² = √x.

Final answer:

The newton function can be implemented in Python using Newton's method for approximating square roots. The main function can then call the newton function repeatedly until the user presses the enter/return key.

Explanation:

The newton function can be implemented in Python using Newton's method for approximating square roots. Here's how you can define the newton function:

def newton(number):
   guess = number / 2
   while True:
       new_guess = (guess + number / guess) / 2
       if abs(guess - new_guess) < 0.0001:
           return new_guess
       guess = new_guess
The main function can then call the newton function repeatedly until the user presses the enter/return key:def main():
   while True:
       user_input = input('Enter a number (or press enter to quit): ')
       if user_input == '':
           break
       number = float(user_input)
       square_root = newton(number)
       print('Square root of', number, 'is', square_root)

main()

This project involves writing a java program to simulate a blackjack card game. You will use a simple console-based user interface to implement this game.
A simple blackjack card game consists of a player and a dealer. A player is provided with a sum of money with which to play. A player can place a bet between $0 and the amount of money the player has. A player is dealt cards, called a hand. Each card in the hand has a point value. The objective of the game is to get as close to 21 points as possible without exceeding 21 points. A player that goes over is out of the game. The dealer deals cards to itself and a player. The dealer must play by slightly different rules than a player, and the dealer does not place bets. A game proceeds as follows:
A player is dealt two cards face up. If the point total is exactly 21 the player wins immediately. If the total is not 21, the dealer is dealt two cards, one face up and one face down. A player then determines whether to ask the dealer for another card (called a "hit") or to "stay" with his/her current hand. A player may ask for several "hits." When a player decides to "stay" the dealer begins to play. If the dealer has 21 it immediately wins the game. Otherwise, the dealer must take "hits" until the total points in its hand is 17 or over, at which point the dealer must "stay." If the dealer goes over 21 while taking "hits" the game is over and the player wins. If the dealer’s points total exactly 21, the dealer wins immediately. When the dealer and player have finished playing their hands, the one with the highest point total is the winner. Play is repeated until the player decides to quit or runs out of money to bet.
You must use an object-oriented solution for implementing this game.

Answers

Answer:i dont know sorry

Explanation:

Other Questions
g A 48.7 g clay, moving at 9.8 m/s, crashes into 1.1 kg brick that is sitting at rest on a frictionless surface. After the collision, the clay is stuck to the brick. This is an inelastic collision, where some kinetic energy (for the system of both masses) is lost. How much kinetic energy is lost (so your answer will be negative!) the width of a rectangle is 6 units less than the the length. The area of a rectangle is 7 units. What is the length of the rectangle. How many atoms are there in 1.50 moles carbon? The main purpose of Lewis and Clarks Journey was to According to research mentioned in this chapter, after observing the amount of time elementary students spent playing new math games, researchers provided rewards to children for playing with the games. After the rewards were removed, __________. Falconry and equestrian sports are especially popular in _? _. * Turkmenistan Uzbekistan Tajikistan Kazakhstan Kyrgyzstan The International Electrotechnical Commission (IEC) is the predominant organization for developing and publishing international standards for technologies related to electrical and electronic devices and processes.A. TrueB. False What is the mode of 50,60,80,60,70,55,85,70,90,50 Which of these are considered long-term human-induced environmental changes? Check all that apply. pollutionhuman-created mass extinctioneutrophicationnon-sustainable harvestingozone layer destructionglobal warming Which cells are larger and ontain a nucleus?o ovoarchaeaprokaryoteeukaryotevirus What is the force exerted by a catchers glove on a 0.15 kg baseball moving at 35 m/s that is stopped in 0.02 sec? which sentence best describes one effect of the poets use of imagery in this excerpt? The most beautiful of the turn-of-the-century magazines was the Vienna Secession's elegant _____________, published from 1898 until 1903. A continuously changing editorial staff, design responsibility handled by a rotating committee of artists, and unpaid contributions of art and design were all focused on experimentation and graphic excellence. The publication was more of a design laboratory than a magazine and enabled designers to experiment with innovative graphics as they explored the merger of text, illustration, and ornament into a lively unity. Match the name of the place with the description.Constantinople/ByzantiumTimbuktuMecca1.located near network of caravan routes, seaways and paved highways; easier to defend the Byzantium empire; near fertile land to grow crops.2.holiest city of Islam, House of Wisdom research library located in the Muslim Empire3.formed by Mansa Musa of the Mali Empire; an architectural showplace; great center of learning Cul de las siguientes cosas NO fue mencionada como algo que se hace para celebrar el Da de Independencia en Mxico?A. Hay un desfile.B. Los padres les dan regalos a sus nios.C. Queman fuegos artificiales.D. El presidente ondea la bandera mexicana. Which of the following statements is FALSE? * Farming became a major industry in Texas partly because land in the West was cheap to purchase. Farming opportunities brought a variety of immigrant cultures into Texas. Farming business in Texas that were once commercial became subsistence farms in order to compete and gain profits. Farming opportunities in Texas led to the settlement of the Western frontier. An object with mass 3.7 kg is executing simple harmonic motion, attached to a spring with spring constant 320 N/m . When the object is 0.017 m from its equilibrium position, it is moving with a speed of 0.60 m/s . Part A Calculate the amplitude of the motion. Express your answer to two significant figures and include the appropriate units. A = nothing nothing whats 45/8 please help Gary owns shares in a company called Archibald Industries Inc. The company's financial performance has been declining over the past few months, and the value of its stock has been decreasing. Gary wants to proactively cut his losses and therefore sells his shares. Anneke, a trading enthusiast, buys shares in Archibald Industries because she believes that the share prices cannot go anywhere but up. Which of the following characteristics of a public stock company does this scenario best exemplify?a) legal personality b) separation of legal ownership and management control c) transferability of investor ownership d) limited liability for investors What are these values?