Answer:
A Program was written to carry out some set activities. below is the code program in C++ in the explanation section
Explanation:
Solution
CODE
#include <iostream>
using namespace std;
int main() {
string name; // variables
int number;
cin >> name >> number; // taking user input
while(number != 0)
{
// printing output
cout << "Eating " << number << " " << name << " a day keeps the doctor away." << endl;
// taking user input again
cin >> name >> number;
}
}
Note: Kindly find an attached copy of the compiled program output to this question.
In this exercise we have to use the knowledge in computational language in C++ to describe a code that best suits, so we have:
The code can be found in the attached image.
What is looping in programming?In a very summarized way, we can describe the loop or looping in software as an instruction that keeps repeating itself until a certain condition is met.
To make it simpler we can write this code as:
#include <iostream>
using namespace std;
int main() {
string name; // variables
int number;
cin >> name >> number; // taking user input
while(number != 0)
{
// printing output
cout << "Eating " << number << " " << name << " a day keeps the doctor away." << endl;
// taking user input again
cin >> name >> number;
}
}
See more about C++ at brainly.com/question/19705654
Create a class called Hangman. In this class, Create the following private variables: char word[40], progress[40], int word_length. word will be used to store the current word progress will be a dash representation of the the current word. It will be the same length as the current word. If word is set to ‘apple’, then progress should be "‑‑‑‑‑" at the beginning of the game. As the user guesses letters, progress will be updated with the correct guesses. For example, if the user guesses ‘p’ then progress will look like "‑pp‑‑" Create a private function void clear_progress(int length). This function will set progress to contain all dashes of length length. If this function is called as clear_progress(10), this will set progress to "‑‑‑‑‑‑‑‑‑‑". Remember that progress is a character array; don’t forget your null terminator. Create the following protected data members: int matches, char last_guess, string chars_guessed, int wrong_guesses, int remaining. Create a public function void initialize(string start). This function will initialize chars_guessed to a blank string, wrong_guesses to 0. Set remaining to 6. Use strcpy() to set word to the starting word passed as start (You can use start.c_str() to convert it to a character array). Set word_length to the length of word. Call clear_progress in this function.
Answer:
See explaination
Explanation:
#include <cstring>
#include <cstdio>
#include <string>
#include <array>
#include <random>
#include <algorithm>
struct RandomGenerator {
RandomGenerator(const size_t min, const size_t max) : dist(min, max) {}
std::random_device rd;
std::uniform_int_distribution<size_t> dist;
unsigned operator()() { return dist(rd); }
};
struct Gallow {
void Draw() const
{
std::printf(" ________\n"
"| |\n"
"| %c %c\n"
"| %c%c%c\n"
"| %c %c\n"
"|\n"
"|\n", body[0], body[1], body[2], body[3],
body[4], body[5], body[6]);
}
bool Increment()
{
switch (++errors) {
case 6: body[6] = '\\'; break;
case 5: body[5] = '/'; break;
case 4: body[4] = '\\'; break;
case 3: body[3] = '|'; break;
case 2: body[2] = '/'; break;
case 1: body[0] = '(', body[1] = ')'; break;
}
return errors < 6;
}
char body[7] { '\0' };
int errors { 0 };
};
struct Game {
void Draw() const
{
#ifdef _WIN32
std::system("cls");
#else
std::system("clear");
#endif
gallow.Draw();
std::for_each(guess.begin(), guess.end(), [](const char c) { std::printf("%c ", c); });
std::putchar('\n');
}
bool Update()
{
std::printf("Enter a letter: ");
const char letter = std::tolower(std::getchar());
while (std::getchar() != '\n') {}
bool found = false;
for (size_t i = 0; i < word.size(); ++i) {
if (word[i] == letter) {
guess[i] = letter;
found = true;
}
}
const auto end_game = [this](const char* msg) {
Draw();
std::puts(msg);
return false;
};
if (not found and not gallow.Increment())
return end_game("#### you lose! ####");
else if (found and word == guess)
return end_game("#### you win! ####");
return true;
}
RandomGenerator rand_gen { 0, words.size() - 1 };
const std::string word { words[rand_gen()] };
std::string guess { std::string().insert(0, word.size(), '_') };
Gallow gallow;
static const std::array<const std::string, 3> words;
};
const std::array<const std::string, 3> Game::words{{"control", "television", "computer"}};
int main()
{
Game game;
do {
game.Draw();
} while (game.Update());
return EXIT_SUCCESS;
}
Box one:
logical
Date and time
Compatibility
Web
Box 2:
&
$
=
#
Box 3:
Not
If
Or
Sum
SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and sum to calculate the total of the triples of the even integers from 2 through 10. Reimplement your code with list comprehensions rather than filter and map.
Answer:
numbers=list(range(1,11)) #creating the list
even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()
triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map
total_triples=sum(triples) #calculatting the sum
numbers=list(range(1,11)) #creating the list
even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension
triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension
total_triples=sum(triples) #calculating the sum.
Explanation:
Go to the page where you are going to write the code, name the file as 1.py, and copy and paste the following code;
numbers=list(range(1,11)) #creating the list
even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()
triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map
total_triples=sum(triples) #calculatting the sum
numbers=list(range(1,11)) #creating the list
even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension
triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension
total_triples=sum(triples) #calculating the sum
Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) with the corresponding number. Remember that the factorial of a number is defined as the product of an integer and all integers before it. For example, the factorial of five (5!) is equal to 1*2*3*4*5
Answer:
Following are code of factorial in python language
def factorial(n): # function
result=1 #variable
for x in range(2,n+1): #iterating the loop
result=result*x #storing result
return result #return result
for n in range(10): #iterating loop
print(n,factorial(n)) #print factorial
Output:
Following are the attachment of output
Explanation:
Missing information :
In the question the information is missing the code is missing which we have to correct it following are the code that are mention below.
def factorial(n): # function
result=1 #variable
for x in range( ): #iterating the loop
result= #storing result
return #return result
for n in range( ): #iterating loop
print(n,factorial(n)) #print factorial
Following are the description of code
We have create a function factorial in this we have pass the one parameter i.e "n".In the for loop we have pass 2,n+1 which has been used to iterating the loop calculating factorial and string the result in the result variable In the main function we have pass the range on which we have to calculated the factorialFinally the print function will print the factorial .Following are the attachment snip of code in the python language
By filling in the blanks to make the factorial function return the factorial of n, we have the following.
def factorial (n):
result = 1
for x in range(2, n+1):
result = result*x
return result
for n in range(10):
print(n,factorial(n))
The math module in Python includes a number series of mathematical operations that may be easily done using the module. The math . factorial() function computes the factorial of a given number.
To write the code perfectly and fill in the blanks:
We created a math factorial function with n parameterThis code is being passed through the iterating loop 2,n+1 for calculation. We string the result, perform the range, and print out the result using the print formula.CODE:
def factorial (n):
result=1
for x in range(2, n+1):
result = result*x
return result
for n in range(10):
print(n,factorial(n))
RESULT:
0 1
1 1
2 2
3 6
4 24
5 120
6 720
7 5040
8 40320
9 362880
Therefore, we can conclude that we've understood how to write the factorial function code in python.
Learn more about python coding here:
https://brainly.com/question/1351889?referrer=searchResults
Fill in the empty function so that it returns the sum of all the divisors of a number, without including it. A divisor is a number that divides into another without a remainder. in python
Program explanation:
In the given program code, a method "sum_divisors" is declared that takes "n" variable in its parameter.Inside the method, the "s" variable is declared, which holds a value which is "0", and used a for loop that defines counts the range values.In the loop, a conditional statement is declared that check remainder value equal to 0 and adds value in "s" variable and return its value.Program code:
def sum_divisors(n):#defining a method sum_divisors that takes a parameter
s = 0#defining a variable s that hold a value 0
for x in range(1,n):#defining a for loop that use n variable to check range value
if(n%x==0):#use if to check remainder value equal to 0
s += x#adding value in s variable
return s#return s value
print(sum_divisors(6))#calling method
print(sum_divisors(12))#calling method
Output:
Please find the attached file.
Learn more:
brainly.com/question/14704583
Which term describes the order of arrangement of files and folders on a computer?
File is the order of arrangement of files and folders.
Answer:
Term describes the order of arrangement of files and folders on a computer would be ORGANIZATION.
:) Hope this helps!
Answer:
The term that describes the order of arrangement of files and folders on a computer is organization.
Explanation:
Write an expression to detect that the first character of userinput matches firstLetter.
import java.util.Scanner; public class CharMatching { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); String userInput; char firstLetter; userInput = scnr.nextLine(); firstLetter = scnr.nextLine().charAt(0); if (/* Your solution goes here */) { System.out.println("Found match: " + firstLetter); } else { System.out.println("No match: " + firstLetter); } return; } }
Answer: Provided in the explanation segment
Explanation:
Below is the code to run this program.
we have that the
Program
import java.util.Scanner;
public class CharMatching {
public static void main(String[] args) {
//Scanner object for keyboard read
Scanner scnr=new Scanner(System.in);
//Variable for user input string
String userInput;
//Variable for firstletter input
char firstLetter;
//Read user input string
userInput=scnr.nextLine();
//Read first letter from user
firstLetter=scnr.nextLine().charAt(0);
//Comparison without case sensititvity and result
if(Character.toUpperCase(firstLetter)==Character.toUpperCase(userInput.charAt(0))) {
System.out.println("Found match: "+firstLetter);
}
else {
System.out.println("No match: "+firstLetter);
}
}
}
Output
Hello
h
Found match: h
cheers i hope this helped !!!
Write the interface (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of type int. A static int data member named nCounters. A constructor that takes an int argument. A function called increment that accepts no parameters and returns no value. A function called decrement that accepts no parameters and returns no value. A function called getValue that accepts no parameters and returns an int. A function named getCounterID that accepts no parameters and returns an int.
Explanation:
See the attached image for The interface (.h file) of a class Counter
Describe how DMA is
used to
transfer data
from peripherals.
Answer:
Think of DMA as a co-processor that is used to quickly transfer data between main memory and peripherals without the intervention of the CPU.
Dave owns a construction business and is in the process of buying a laptop. He is looking for a laptop with a hard drive that will likely continue to function if the computer is dropped. Which type of hard drive does he need?
Answer:
Solid state drive
Explanation:
The term solid-state drive is used for the electronic circuitry made entirely from semiconductors. This highlights the fact that the main storage form, in terms of a solid-state drive, is via semiconductors instead of a magnetic media for example a hard disk. In lieu of a more conventional hard drive, SSD is built to live inside the device. SSDs are usually more resistant to physical shock in comparison to the electro-mechanical drives and it functions quietly and has faster response time. Therefore, SSD will be best suitable for the Dave.
Write a static method named contains that accepts two arrays of integers a1 and a2 as
parameters and that returns a boolean value indicating whether or not a2's sequence of
elements appears in a1 (true for yes, false for no). The sequence of elements in a2 may
appear anywhere in a1 but must appear consecutively and in the same order. For example, if
variables called list1 and list2 store the following values:
int[] list1 = {1, 6, 2, 1, 4, 1, 2, 1, 8};
int[] list2 = {1, 2, 1};
Then the call of contains(list1, list2) should return true because list2's sequence of
values {1, 2, 1} is contained in list1 starting at index 5. If list2 had stored the values {2,
1, 2}, the call of contains(list1, list2) would return false because list1 does not
contain that sequence of values. Any two lists with identical elements are considered to contain
each other, so a call such as contains(list1, list1) should return true.
Answer:
Sew explaination foe code
Explanation:
import java.lang.*;
import java.util.*;
import java.io.*;
class Main
{
public static Boolean checkSubset(int[] list1, int[] list2)
{
int l = list2.length;
for(int i = 0; i<list1.length-l; i++)
{
Boolean flag = true;
for(int j = 0; j<list2.length; j++)
{
if(list1[i+j] != list2[j])
{
flag = false;
break;
}
}
if(flag) return true;
}
return false;
}
public static void main(String args[])
{
int[] l1 = {1,6,2,1,4,1,2,1,8};
int[] l2 = {1,2,2};
System.out.println(checkSubset(l1,l2));
}
}
How is a struck-by rolling object defined?
Answer:
Struck by rolling object is commonly defined as Struck-By Rolling Object Hazard because it was caused by rolling objects or any objects that moves in circular motion that could cause an injury or accident.
Explanation:
Explain possible ways that Darla can communicate with her coworker Terry, or her manager to make sure Joe receives great customer service?
Answer:
They can communicate over the phone or have meetings describing what is and isn't working for Joe. It's also very important that Darla makes eye contact and is actively listening to effectively handle their customer.
Explanation:
How can u refer to additional information while giving a presentation
Answer:
There are various ways: Handing out papers/fliers to people, or presenting slides.
Write a program that has an input as a test score, and figures out a letter grade for that score, such as "A", "B", "C", etc. according to the scale: 90 or more - A 80 - 90 (excluding 90) - B 70 - 80 (excluding 80) - C 60 - 70 (excluding 70) - D else - F The program should print both a test score, and a corresponding letter grade. Test your program with different scores. Use a compound IF-ELSE IF statement to find a letter grade.
Answer:
The program in csharp for the given scenario is shown.
using System;
class ScoreGrade {
static void Main() {
//variables to store score and corresponding grade
double score;
char grade;
//user input taken for score
Console.Write("Enter the score: ");
score = Convert.ToInt32(Console.ReadLine());
//grade decided based on score
if(score>=90)
grade='A';
else if(score>=80 && score<90)
grade='B';
else if(score>=70 && score<80)
grade='C';
else if(score>=60 && score<70)
grade='D';
else
grade='F';
//score and grade displayed
Console.WriteLine("Score: "+score+ " Grade: "+grade);
}
}
OUTPUT1
Enter the score: 76
Score: 76 Grade: C
OUTPUT2
Enter the score: 56
Score: 56 Grade: F
Explanation:
1. The variables to hold the score and grade are declared as double and char respectively.
int score;
char grade;
2. The user is prompted to enter the score. The user input is not validated and the input is stored in the variable, score.
3. Using if-else-if statements, the grade is decided based on the value of the score.
if(score>=90)
grade='A';
else if(score>=80 && score<90)
grade='B';
else if(score>=70 && score<80)
grade='C';
else if(score>=60 && score<70)
grade='D';
else
grade='F';
4. The score and the corresponding grade are displayed.
5. The program can be tested for different values of score.
6. The output for two different scores and two grades is included.
7. The program is saved using ScoreGrade.cs. The .cs extension indicates a csharp program.
8. The whole code is written inside a class since csharp is a purely object-oriented language.
9. In csharp, user input is taken using Console.ReadLine() which reads a string.
10. This string is converted into an integer using Convert.ToInt32() method.
score = Convert.ToInt32(Console.ReadLine());
11. The output is displayed using Console.WriteLine() or Console.Write() methods; the first method inserts a line after displaying the message which is not done in the second method.
12. Since the variables are declared inside Main(), they are not declared static.
13. If the variables are declared outside Main() and at the class level, it is mandatory to declare them with keyword, static.
Write a program to read as many test scores as the user wants from the keyboard (assuming at most 50 scores). Print the scores in (1) original order, (2) sorted from high to low (3) the highest score, (4) the lowest score, and (5) the average of the scores. Implement the following functions using the given function prototypes: void displayArray(int array[], int size) - Displays the content of the array void selectionSort(int array[], int size) - sorts the array using the selection sort algorithm in descending order. Hint: refer to example 8-5 in the textbook. int findMax(int array[], int size) - finds and returns the highest element of the array int findMin(int array[], int size) - finds and returns the lowest element of the array double findAvg(int array[], int size) - finds and returns the average of the elements of the array
Answer: Provided in the explanation segment
Explanation:
Below is the code to carry out this program;
/* C++ program helps prompts user to enter the size of the array. To display the array elements, sorts the data from highest to lowest, print the lowest, highest and average value. */
//main.cpp
//include header files
#include<iostream>
#include<iomanip>
using namespace std;
//function prototypes
void displayArray(int arr[], int size);
void selectionSort(int arr[], int size);
int findMax(int arr[], int size);
int findMin(int arr[], int size);
double findAvg(int arr[], int size) ;
//main function
int main()
{
const int max=50;
int size;
int data[max];
cout<<"Enter # of scores :";
//Read size
cin>>size;
/*Read user data values from user*/
for(int index=0;index<size;index++)
{
cout<<"Score ["<<(index+1)<<"]: ";
cin>>data[index];
}
cout<<"(1) original order"<<endl;
displayArray(data,size);
cout<<"(2) sorted from high to low"<<endl;
selectionSort(data,size);
displayArray(data,size);
cout<<"(3) Highest score : ";
cout<<findMax(data,size)<<endl;
cout<<"(4) Lowest score : ";
cout<<findMin(data,size)<<endl;
cout<<"(5) Lowest scoreAverage score : ";
cout<<findAvg(data,size)<<endl;
//pause program on console output
system("pause");
return 0;
}
/*Function findAvg that takes array and size and returns the average of the array.*/
double findAvg(int arr[], int size)
{
double total=0;
for(int index=0;index<size;index++)
{
total=total+arr[index];
}
return total/size;
}
/*Function that sorts the array from high to low order*/
void selectionSort(int arr[], int size)
{
int n = size;
for (int i = 0; i < n-1; i++)
{
int minIndex = i;
for (int j = i+1; j < n; j++)
if (arr[j] > arr[minIndex])
minIndex = j;
int temp = arr[minIndex];
arr[minIndex] = arr[i];
arr[i] = temp;
}
}
/*Function that display the array values */
void displayArray(int arr[], int size)
{
for(int index=0;index<size;index++)
{
cout<<setw(4)<<arr[index];
}
cout<<endl;
}
/*Function that finds the maximum array elements */
int findMax(int arr[], int size)
{
int max=arr[0];
for(int index=1;index<size;index++)
if(arr[index]>max)
max=arr[index];
return max;
}
/*Function that finds the minimum array elements */
int findMin(int arr[], int size)
{
int min=arr[0];
for(int index=1;index<size;index++)
if(arr[index]<min)
min=arr[index];
return min;
}
cheers i hope this help!!!
6 things you should consider when planning a PowerPoint Presentation.
Answer: I would suggest you consider your audience and how you can connect to them. Is your presentation, well, presentable? Is whatever you're presenting reliable and true? Also, no more than 6 lines on each slide. Use colors that contrast and compliment. Images, use images. That pulls whoever you are presenting to more into your presentation.
Explanation:
A university wants to schedule the classrooms for final exams. The attributes are given below:
course : course id, name, and department
section : section id, enrollment, and dependent as a weak entity set on course
room : room number, capacity, and building
exam: course id, section id, room number, and time.
1) Determine the relationships among these entity sets. Clearly specify the arity, the attributes, and the mapping cardinality of these relationships.
2) Construct an E-R diagram to for the scheduling system.
Answer:
See explaination
Explanation:
Clearly the entities are as follows:-
Course
Section
Room
Test
The relationship among entities are as follows:-
Course has Section
Test is conducted for Course
Test is conducted in Section
Test is conducted in Room
Attributes of each entities are as follows:-
Course (CourseID, Name, Department)
Section (SectionID, Enrollment)
Room (RoomNumber, Capacity, Building)
Test (Time)
Section is a week entity as, there may be same sections for different courses, therefore section uses the primary key of course entity as foreign key.
Also entity Test is dependent upon the entities Room,Section and Course, therefore primary keys of these entities will be used as foreign key in the Test entity.
Check attachment for the ER diagram
In Java please:
Palindrome reads the same from left or right, mom for example. There is a palindrome which must be modified, if possible. Change exactly one character of the string to another character in the range ascii[a-z] so that the string meets the following three conditions:
a. The new string is lower alphabetically than the initial string.
b. The new string is the lowest value string alphabetically that can be created from the original palindrome after making only one change.
c. The new string is not a palindrome.
Return the new string, or, if it not possible to create a string meeting the criteria, return the string IMPOSSIBLE.
Example:
palindromeStr = 'aaabbaaa'
O Possible strings lower alphabetically than 'aaabbaaa' after one change are [aaaabaaa', 'aaabaaaa').
O aaaabaaa' is not a palindrome and is the lowest string that can be created from palindromeStr.
Answer:
See explaination
Explanation:
public class PalindromeChange {
public static void main(String[] args) {
System.out.println("mom to non palindrom word is: "+changTONonPalindrom("mom"));
System.out.println("mom to non palindrom word is: "+changTONonPalindrom("aaabbaaa"));
}
private static String changTONonPalindrom(String str)
{
int mid=str.length()/2;
boolean found=false;
char character=' ';
int i;
for(i=mid-1;i>=0;i--)
{
character = str.charAt(i);
if(character!='a')
{
found=true;
break;
}
}
if(!found)
{
for(i=mid+1;i<str.length();i++)
{
character = str.charAt(i);
if(character!='a')
{
found=true;
break;
}
}
}
// This gives the character 'a'
int ascii = (int) character;
ascii-=1;
str = str.substring(0, i) + (char)ascii+ str.substring(i + 1);
return str;
}
}
Given the following header: vector split(string target, string delimiter); implement the function split so that it returns a vector of the strings in target that are separated by the string delimiter. For example: split("10,20,30", ",") should return a vector with the strings "10", "20", and "30". Similarly, split("do re mi fa so la ti do", " ") should return a vector with the strings "do", "re","mi", "fa", "so", "la", "ti", and "do". Write a program that inputs two strings and calls your function to split the first target string by the second delimiter string and prints the resulting vector all on line line with elements separated by commas. A successful program should be as below with variable inputs:
Answer:
see explaination
Explanation:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(string, string);
int main()
{
vector<string> splitedStr;
string data;
string delimiter;
cout << "Enter string to split:" << endl;
getline(cin,data);
cout << "Enter delimiter string:" << endl;
getline(cin,delimiter);
splitedStr = split(data,delimiter);
cout << "\n";
cout << "The substrings are: ";
for(int i = 0; i < splitedStr.size(); i++)
cout << "\"" << splitedStr[i] << "\"" << ",";
cout << endl << endl;
cin >> data;
return 0;
}
vector<string> split(string target, string delimiter)
{
unsigned first = 0;
unsigned last;
vector<string> subStr;
while((last = target.find(delimiter, first)) != string::npos)
{
subStr.push_back(target.substr(first, last-first));
first = last + delimiter.length();
}
subStr.push_back(target.substr(first));
return subStr;
}
Write the definition of a function words_typed, that receives two parameters. The first is a person's typing speed in words per minute (an integer greater than or equal to zero). The second is a time interval in seconds (an integer greater than zero). The function returns the number of words (an integer) that a person with that typing speed would type in that time interval.
//Method definition of words_typed
//The return type is int
//Takes two int parameters: typingSpeed and timeInterval
public static int words_typed(int typingSpeed, int timeInterval) {
//Get the number of words typed by
//finding the product of the typing speed and the time interval
//and then dividing the result by 60 (since the typing speed is in "words
// per minute" and the time interval is in "seconds")
int numberOfWords = typingSpeed * timeInterval / 60;
//return the number of words
return numberOfWords;
} //end of method declaration
Explanation:The code above has been written in Java and it contains comments explaining each of the lines of the code. Please go through the comments.
Answer:
I am writing the program in Python.
def words_typed(typing_speed,time_interval):
typing_speed>=0
time_interval>0
no_of_words=int(typing_speed*(time_interval/60))
return no_of_words
output=words_typed(20,30)
print(output)
Explanation:
I will explain the code line by line.
First the statement def words_typed(typing_speed,time_interval) is the definition of a function named words_typed which has two parameters typing_speed and time_interval.
typing_speed variable of integer type in words per minute.
time_interval variable of int type in seconds
The statements typing_speed>=0 and time_interval>0 means that value of typing_speed is greater than or equal to zero and value of time_interval is greater than zero as specified in the question.
The function words_typed is used to return the number of words that a person with typing speed would type in that time interval. In order to compute the words_typed, the following formula is used:
no_of_words=int(typing_speed*(time_interval/60))
The value of typing_speed is multiplied by value of time_interval in order to computer number of words and the result of the multiplication is stored in no_of_words. Here the time_interval is divided by 60 because the value of time_interval is in seconds while the value of typing_speed is in minutes. So to convert seconds into minutes the value of time_interval is divided by 60 because 1 minute = 60 seconds.
return no_of_words statement returns the number of words.
output=words_typed(20,30) statement calls the words_typed function and passed two values i.e 20 for typing_speed and 30 for time_interval.
print(output) statement displays the number of words a person with typing speed would type in that time interval, on the output screen.
*Sometimes it is difficult to convince top management to commit funds to develop and implement a SIS why*
Step-by-step Explanation:
SIS stands for: The Student Information System (SIS).
This system (a secure, web-based accessible by students, parents and staff) supports all aspects of a student’s educational experience, and other information. Examples are academic programs, test grades, health information, scheduling, etc.
It is difficult to convince top management to commit funds to develop and implement SIS, this can be due to a thousand reasons.
The obvious is that the management don't see the need for it. They would rather have students go through the educational process the same way they did. Perhaps, they just don't trust the whole process, they feel more in-charge while using a manual process.
3. You are working for a usability company that has recently completed a usability study of an airline ticketing system. They conducted a live AB testing of the original website and a new prototype your team developed. They brought in twenty participants into the lab and randomly assigned them to one of two groups: one group assigned to the original website, and the other assigned to the prototype. You are provided with the data and asked to perform a hypothesis test. Using the standard significance value (alpha level) of 5%, compute the four step t-test and report all important measurements. You can use a calculator or SPSS or online calculator to compute the t-test. (4 pts)
Answer:
Check the explanation
Explanation:
Let the population mean time on task of original website be [tex]\mu_1[/tex] and that of new prototype be [tex]\mu_2[/tex]
Here we are to test
[tex]H_0:\mu_1=\mu_2\;\;against\;\;H_1:\mu_1<\mu_2[/tex]
The data are summarized as follows:
Sample 1 Sample 2
Sample size n=20 n=20
Sample mean [tex]\bar{x}_1=243.4[/tex] [tex]\bar{x}_2=253.4[/tex]
Sample SD s1=130.8901 s2=124.8199
The test statistic is obtained from online calculator as
t=-0.23
The p-value is given by 0.821
As the p-value is more than 0.05, we fail to reject the null hypothesis at 5% level of significance and hence conclude that there is no statistically significant difference between the original website and the prototype developed by the team at 5% level of significance.
The Monte Carlo (MC) Method (Monte Carlo Simulation) was first published in 1949 by Nicholas Metropolis and Stanislaw Ulam in the work "The Monte Carlo Method" in the Journal of American Statistics Association. The name Monte Carlo has its origins in the fact that Ulam had an uncle who regularly gambled at the Monte Carlo casino in Monaco. In fact, way before 1949 the method had already been extensively used as a secret project of the U.S. Defense Department during the so-called "Manhattan Project". The basic principle of the Monte Carlo Method is to implement on a computer the Strong Law of Large Numbers (SLLN) (see also Lecture 9). The Monte Carlo Method is also typically used as a probabilistic method to numerically compute an approximation of a quantity that is very hard or even impossible to compute exactly like, e.g., integrals (in particular, integrals in very high dimensions!). The goal of Problem 2 is to write a Python code to estimate the irrational number
Answer:
can you give more detail
Explanation:
Zoom Vacuum, a family-owned manufacturer of high-end vacuums, has grown exponentially over the last few years. However, the company is having difficulty preparing for future growth. The only information system used at Zoom is an antiquated accounting system. The company has one manufacturing plant located in Iowa; and three warehouses, in Iowa, New Jersey, and Nevada. The Zoom sales force is national, and Zoom purchases about 25 percent of its vacuum parts and materials from a single overseas supplier. You have been hired to recommend the information systems Zoom should implement in order to maintain their competitive edge. However, there is not enough money for a full-blown, cross-functional enterprise application, and you will need to limit the first step to a single functional area or constituency. What will you choose, and why?
Answer:A TPS focusing on production and manufacturing to keep production costs low while maintaining quality, and for communicating with other possible vendors. The TPS would later be used to feed MIS and other higher level systems.
Explanation:
You can use this area to create your resume.
Answer:
YOUR NAME
YOUR CITY, STATE, AND ZIP CODE
YOUR PHONE NUMBER
YOUR EMAIL
Professional Summary
Reliable, top-notch sales associate with outstanding customer service skills and relationship-building strengths. Dedicated to welcoming customers and providing comprehensive service. In-depth understanding of sales strategy and merchandising techniques. Dependable retail sales professional with experience in dynamic, high-performance environments. Skilled in processing transactions, handling cash, using registers and arranging merchandise. Maintains high-level customer satisfaction by smoothly resolving customer requests, needs and problems. Seasoned Sales Associate with consistent record of exceeding quotas in sales environments. Delivers exceptional customer service and product expertise to drive customer satisfaction ratings. Proficient in use and troubleshooting of POS systems.
Skills
Returns and Exchanges
Adaptable and Flexible
Excellent Written and Verbal Communication
Meeting Sales Goals
Strong Communication and Interpersonal Skills
Time Management
Cash Handling
Reliable and Responsible
Work History
March 2020 to September 2021
Goodwill OF YOUR STATE
Retail Sales Associate
Helped customers complete purchases, locate items and join reward programs.
Checked pricing, scanned items, applied discounts and printed receipts to ring up customers.
Folded and arranged merchandise in attractive displays to drive sales.
Greeted customers and helped with product questions, selections and purchases.
Organized store merchandise racks and displays to promote and maintain visually appealing environments.
Monitored sales floor and merchandise displays for presentable condition, taking corrective action such as restocking or reorganizing products.
Balanced and organized cash register by handling cash, counting change and storing coupons.
Trained new associates on cash register operations, conducting customer transactions and balancing drawer.
Answered questions about store policies and addressed customer concerns.
Issued receipts and processed refunds, credits or exchanges.
Maintained clean sales floor and straightened and faced merchandise.
Education
YOUR HIGH SCHOOL THAT YOU ATTEND
Languages
Spanish
Explanation:
THIS IS MY RESUME IF YOU HAVE MORE WORK EXPERIENCE THEN ADD IT AFTER THE GOODWILL. I GOT A 100% ON EDGE.
g Q 2 Suppose I need a data structure having the following characteristics: a) must be very space efficient, and b) I have a good idea of how much total data needs to be stored. b) must have fastest access possible, and c) once I add an item to the data structure, I do not remove it. Part 1: What data structure would I choose and why? (2,4) Part 2: If I remove characteristic b, what similar data structure is a possible candidate?
Explanation:
a.I would choose an advanced data structure like dispersion tables.
Scatter tables, better known as hash tables, are one of the most frequently used data structures. To get an initial idea, scatter tables make it possible to have a structure that relates a key to a value, such as a dictionary. Internally, the scatter tables are an array. Each of the array positions can contain none, one or more dictionary entries.
It will normally contain a maximum of one, which allows quick access to the elements, avoiding a search in most cases. To know at which position in the array to search or insert a key, a scatter function is used. A scatter function relates each key to an integer value. Two equal keys must have the same dispersion value, also called a hash value, but two different keys can have the same dispersion value, which would cause a collision.
B. If I eliminated the characteristic b, a possible candidate keeping the previous characteristics would be: Balanced binary trees
Balanced binary trees are data structures that store key-data pairs, in an orderly way according to the keys, and allow quick access to the data, given a particular key, and to go through all the elements in order.
They are appropriate for large amounts of information and have less overhead than a scatter table, although the access time is of greater computational complexity.
Although the storage form has a tree structure internally, this is not externalized in the API, making the handling of the data transparent. They are called balanced because, each time they are modified, the branches are rebalanced in such a way that the height of the tree is as low as possible, thus shortening the average time of access to the data.
The equation of certain traveling waves is y(x.t) = 0.0450 sin(25.12x - 37.68t-0.523) where x and y are in
meters, and t in seconds. Determine the following:
(a) Amplitude. (b) wave number (C) wavelength. (d) angular frequency. (e) frequency: (1) phase angle, (g) the
wave propagation speed, (b) the expression for the medium's particles velocity as the waves pass by them, and (i)
the velocity of a particle that is at x=3.50m from the origin at t=21.os
Answer:
A. 0.0450
B. 4
C. 0.25
D. 37.68
E. 6Hz
F. -0.523
G. 1.5m/s
H. vy = ∂y/∂t = 0.045(-37.68) cos (25.12x - 37.68t - 0.523)
I. -1.67m/s.
Explanation:
Given the equation:
y(x,t) = 0.0450 sin(25.12x - 37.68t-0.523)
Standard wave equation:
y(x, t)=Asin(kx−ωt+ϕ)
a.) Amplitude = 0.0450
b.) Wave number = 1/ λ
λ=2π/k
From the equation k = 25.12
Wavelength(λ ) = 2π/25.12 = 0.25
Wave number (1/0.25) = 4
c.) Wavelength(λ ) = 2π/25.12 = 0.25
d.) Angular frequency(ω)
ωt = 37.68t
ω = 37.68
E.) Frequency (f)
ω = 2πf
f = ω/2π
f = 37.68/6.28
f = 6Hz
f.) Phase angle(ϕ) = -0.523
g.) Wave propagation speed :
ω/k=37.68/25.12=1.5m/s
h.) vy = ∂y/∂t = 0.045(-37.68) cos (25.12x - 37.68t - 0.523)
(i) vy(3.5m, 21s) = 0.045(-37.68) cos (25.12*3.5-37.68*21-0.523) = -1.67m/s.
1. Write a pair of classes, Square1 and Rectangle1. Define Square1 as a subclass of Rectangle1. In addition to setters and getters, provide such methods as computeArea and computePerimeter. Specify the preconditions, postconditions and class invariants, if any, as comments (
Answer:
The java program including classes is shown below.
import java.util.*;
import java.lang.*;
//base class
class Rectangle1
{
//variables to hold dimensions and area
static double l;
static double b;
static double a;
//setter
static void setWidth(double w)
{
b=w;
}
//getter
static double getWidth()
{
return b;
}
//setter
static void setLength(double h)
{
l=h;
}
//getter
static double getLength()
{
return b;
}
//area calculation for rectangle
static void computeArea()
{
a = getLength()*getWidth();
System.out.println("Area of rectangle = " +a);
}
}
//derived class
class Square1 extends Rectangle1
{
//variables to hold dimensions and perimeter
static double s;
static double peri;
//settter
static void setSide(double d)
{
s=d;
}
//getter
static double getSide()
{
return s;
}
//perimeter calculation for square
static void computePerimeter()
{
peri = 2*(getSide()+getSide());
System.out.println("Perimeter of square = "+peri);
}
}
public class MyClass {
public static void main(String args[]) {
//object of derived class created
Square1 ob = new Square1();
ob.setLength(1);
ob.setWidth(4);
ob.setSide(1);
ob.computeArea();
ob.computePerimeter();
}
}
Explanation:
1. The class for rectangle is defined having variables to hold the dimensions of a rectangle.
2. The getters and setters are included for both the dimensions.
3. The method to compute the area of the rectangle is defined.
4. The class for square is defined having variables to hold the side of a square.
5. The getter and setter are included for the dimension of the square.
6. The method to compute the perimeter of the square is defined.
7. The class Square1 is the derived class which inherits the class Rectangle1 through the keyword extends.
8. All the variables, getters, setters and methods are declared as static.
9. Another class is defined having only the main() method.
10. Inside main(), the object of the derived class, Square1, is created.
11. The setters and the methods are called through this object.
12. The value of the dimensions are passed as arguments to the setters.
13. The output is attached in an image.
Donnell backed up the information on his computer every week on a flash drive. Before copying the files to the flash drive, he always ran a virus scan against the files to ensure that no viruses were being copied to the flash drive. He bought a new computer and inserted the flash drive so that he could transfer his files onto the new computer. He got a message on the new computer that the flash drive was corrupted and unreadable; the information on the flash drive cannot be retrieved. Assuming that the flash drive is not carrying a virus, which of the following does this situation reflect?
a. Compromise of the security of the information on the flash drive
b. Risk of a potential breach in the integrity of the data on the flash drive
c. Both of the above
d. Neither of the above.
Answer:
b. Risk of a potential breach in the integrity of the data on the flash drive
Explanation:
The corrupted or unreadable file error is an error message generated if you are unable to access the external hard drive connected to the system through the USB port. This error indicates that the files on the external hard drive are no longer accessible and cannot be opened.
There are several reasons that this error message can appear:
Viruses and Malware affecting the external hard drive .Physical damage to external hard drive or USB memory .Improper ejection of removable drives.