Answer:
Index
Explanation:
Got it right e2020
is a device connected to a sound card in the system.
Answer:
Yes
Explanation:
A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces used for professional audio applications.
What is it called when you remove some information from a file or remove a file from the disk ? A) save b) delete c) edit d) remove
Answer:
delete is the answer okkkkkkkkkkkkkkkk
8. Explain what the following spredications of a monitor refer to their significance for the user and how
they are measured:
b) 1800 / 900
Answer:
A computer monitor is an output device that displays information in pictorial form. A monitor usually comprises the visual display, circuitry, casing, and power supply. The display device in modern monitors is typically a thin film transistor liquid crystal display (TFT-LCD) with LED backlighting having replaced cold-cathode fluorescent lamp (CCFL) backlighting. Previous monitors used a cathode ray tube (CRT). Monitors are connected to the computer via VGA, Digital Visual Interface (DVI), HDMI, DisplayPort, USB-C, low-voltage differential signaling (LVDS) or other proprietary connectors and signals.
Originally, computer monitors were used for data processing while television sets were used for entertainment. From the 1980s onwards, computers (and their monitors) have been used for both data processing and entertainment, while televisions have implemented some computer functionality. The common aspect ratio of televisions, and computer monitors, has changed from 4:3 to 16:10, to 16:9.
Modern computer monitors are easily interchangeable with conventional television sets and vice versa. However, as computer monitors do not necessarily include integrated speakers nor TV tuners (such as Digital television adapters), it may not be possible to use a computer monitor as a TV set without external components.[1]
History
Early electronic computers were fitted with a panel of light bulbs where the state of each particular bulb would indicate the on/off state of a particular register bit inside the computer. This allowed the engineers operating the computer to monitor the internal state of the machine, so this panel of lights came to be known as the 'monitor'. As early monitors were only capable of displaying a very limited amount of information and were very transient, they were rarely considered for program output. Instead, a line printer was the primary output device, while the monitor was limited to keeping track of the program's operation.[2]
Computer monitors were formerly known as visual display units (VDU), but this term had mostly fallen out of use by the 1990s.
Technologies
Further information: Comparison of CRT, LCD, Plasma, and OLED and History of display technology
Multiple technologies have been used for computer monitors. Until the 21st century most used cathode ray tubes but they have largely been superseded by LCD monitors.
Cathode ray tube
Main article: Cathode ray tube
The first computer monitors used cathode ray tubes (CRTs). Prior to the advent of home computers in the late 1970s, it was common for a video display terminal (VDT) using a CRT to be physically integrated with a keyboard and other components of the system in a single large chassis. The display was monochrome and far less sharp and detailed than on a modern flat-panel monitor, necessitating the use of relatively large text and severely limiting the amount of information that could be displayed at one time. High-resolution CRT displays were developed for the specialized military, industrial and scientific applications but they were far too costly for general use.
Some of the earliest home computers (such as the TRS-80 and Commodore PET) were limited to monochrome CRT displays, but color display capability was already a standard feature of the pioneering Apple II, introduced in 1977, and the speciality of the more graphically sophisticated Atari 800, introduced in 1979. Either computer could be connected to the antenna terminals of an ordinary color TV set or used with a purpose-made CRT color monitor for optimum resolution and color quality. Lagging several years behind, in 1981 IBM introduced the Color Graphics Adapter, which could display four colors with a resolution of 320 × 200 pixels, or it could produce 640 × 200 pixels with two colors. In 1984 IBM introduced the Enhanced Graphics Adapter which was capable of producing 16 colors and had a resolution of 640 × 350.[3]
By the end of the 1980s color CRT monitors that could clearly display 1024 × 768 pixels were widely available and increasingly affordable. During the following decade, maximum display resolutions gradually increased and prices continued to fall. CRT technology remained dominant in the PC monitor market into the new millennium partly because it was cheaper to produce and offered to view angles close to 180°.[4] CRTs still offer some image quality advantages[clarification needed] over LCDs but improvements to the latter have made them much less obvious. The dynamic range of early LCD panels was very poor, and although text and other motionless graphics were sharper than on a CRT, an LCD characteristic known as pixel lag caused moving graphics to appear noticeably smeared and blurry.
Explanation:
The cash register program will have items. For each item, the name and cost are saved. For a transaction, it will accept any number of items (not known in advance) and any number of payments of different payment types (not known in advance). For each transaction, it calculates the total including a 7% sales tax and keeps prompting for a payment until the total has been paid. It also determines if any change is required. Thus, a transaction is responsible for calculating the amount of money that needs to be paid, accepting money, and generating a receipt. A receipt holds information about a transaction so that it can display how much each item cost, how the transaction was paid for, etc. (see example outputbelow).Payment type includes CASH, DEBIT_CARD, CREDIT_CARDandCHECK. Each payment consists of an amount and payment type
Hints
1. All fields should be private.
2. The PaymentType class should be an enum class with values: CASH, DEBIT_CARD, CREDIT_CARD, CHECK
3. Payment type information should not print the enum directly
4. Use final to store the transaction for each receipt.
5. Output:
A. The values for subtotal, tax, total, and payment information are all aligned. You can achieve this by using the tab character '\t' in your Strings. The item lines do not need to be aligned.
B. Do not worry about only using 2 decimal places. Let Java decide how many decimal places to use.
6. Create a main class to house the main method. In the main method, create some items, a transaction, and display the receipt.
A. Example outputs
Example: Pay everything with one payment
Transaction listing the items and asking for payment:
Item 1: apple: 0.5
Item 2: pear: 0.75
Item 3: pineapple: 0.75
Total: 2.14
Please enter payment type.
1. Cash
2. Debit card
3. Credit card
4. Check
2
Enter the amount to pay with this type.
2.14
Total after payment: 0.0
Receipt printed:
apple: 0.5
pear: 0.75
pineapple: 0.75
----------------------------------------------------------
Subtotal:
Tax:
Total:
Debit:
Change: 2.0 0.14 2.14 2.14 0.0
Example: Paying with multiple payments and payment type
Item 1: refrigerator: 800.71
Total: 856.7597000000001
Please enter payment type.
1. Cash
2. Debit card
3. Credit card
4. Check
1
Enter the amount to pay with this type.
400
Total after payment: 456.75970000000007
Please enter payment type.
1. Cash
2. Debit card
3. Credit card
4. Check
2
Enter the amount to pay with this type.
475
Total after payment: -18.240299999999934
refrigerator: 800.71
3
Subtotal: 800.71
Tax: 56.04970000000001
Total: 856.7597000000001
Cash: 400.0
Debit: 475.0
Change: 18.240299999999934
Example: Using the same payment type multiple times
Item 1: apple: 0.5
Item 2: pear: 0.75
Item 3: pineapple: 0.75
Total: 2.14
Please enter payment type.
1. Cash
2. Debit card
3. Credit card
4. Check
1
Enter the amount to pay with this type.
1.25
Total after payment: 0.8900000000000001
Please enter payment type.
1. Cash
2. Debit card
3. Credit card
4. Check
1
Enter the amount to pay with this type.
10.50
Total after payment: -9.61
apple: 0.5
pear: 0.75
pineapple: 0.75
Subtotal: 2.0
Tax : 0.14
Total: 2.14
Cash: 1.25
Cash: 110.5
Change: 9.61
Answer:
Explanation:
package sample;
import java.util.Scanner;
public class Main extends newOrder{
public static void main(String[] args) {
newOrder order = new newOrder();
order.newOrder("apple", 0.5);
order.newOrder("pear", 0.75);
order.newOrder("pineapple", 0.75);
double newTotal = order.getTotal();
order.printItems();
order.printTotal();
while (newTotal != 0) {
Scanner in = new Scanner(System.in);
System.out.println("Please enter payment type.\n" + "Cash \nDebit card \nCredit card \nCheck");
String paymentType = in.nextLine();
System.out.println("Enter the amount to pay with this type: ");
double amount = in.nextDouble();
newTotal -= amount;
System.out.println("Total after payment: " + newTotal);
}
System.out.println("Receipt Printed:");
order.printItems();
order.printSubtotal();
System.out.println("Tax: 7%");
order.printTotal();
}
}
------------------------------------------------------------------------------------------------------------
package sample;
public enum PaymentType {
CASH, DEBIT_CARD, CREDIT_CARD, CHECK
}
-----------------------------------------------------------------------------------------------------------
package sample;
import java.util.HashMap;
class newOrder {
private String name;
private double cost;
private double total;
private double subtotal;
HashMap<String, Double> itemList = new HashMap<>();
public void newOrder(String name, double cost) {
this.name = name;
this.cost = cost;
this.total += cost;
}
public void printItems() {
for (String i: itemList.keySet()) {
System.out.println( i + ": \t" + itemList.get(i));
}
}
public double getTotal() {
return (total * 1.07);
}
public void printSubtotal() {
for (double i : itemList.values()) {
subtotal += i;
}
System.out.println("Subtotal: " + subtotal);
}
public void printTotal() {
double total = subtotal * 1.07;
System.out.println("Total: " + total);
}
}
Write a program that accepts a positive integer N as command-line argument, and outputs True if N is the square of some integer, and False otherwise. Do not use math.sqrt() or similar! Hint: Clearly, all candidates i which may satisfy i2 = N must be at most N (for which "corner case" of N is i equal to N?). Therefore, it is sufficient to check if there exists an i in the range 1 ≤ i ≤ N such that i2 = N. In other words, you want to evaluate the expression (12 == N)or (22 == N)or (32 == N)or ··· or ((N − 1)2 == N) or (N2 == N). Practice goal: A variation of the primality checking program we have seen in class; follows a Boolean accumulation pattern, with logical or.
Answer:
In Python:
N = int(input("Positive integer: "))
if N > 0:
flag = False
for i in range(1,N+1):
if i * i == N:
flag = True
break
print(str(flag))
else:
print("Positive integer only")
Explanation:
N = int(input("Positive integer: "))
If the number is positive
if N > 0:
This initializes a boolean variable to false
flag = False
This iterates from 1 to the input integer
for i in range(1,N+1):
This checks if th number is a square of some integer
if i * i == N:
If yes, flag is set to true
flag = True
The loop is exited
break
This prints either true or false, depending on the result of the loop
print(str(flag))
If otherwise, that the number is not positive
else:
print("Positive integer only")
2.5 lesson practice edhesive
Answer:
Huh,.......? what.....?
Answer:
1. They are contained in the math module.
2. 0, 1, ... 7
3. 0.0 <= r < 5
Explanation:
Your tasks include identifying competitors, determining your company's market penetration and consulting market research sources. These tasks are examples of:
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A
search engine optimization (SEO).
B
off-site Web analytics.
C
on-site Web analytics.
D
pay-per-click.
Answer:
B. off-site Web analytics.
Explanation:
Marketing can be defined as the process of developing promotional techniques and sales strategies by a firm, so as to enhance the availability of goods and services to meet the needs of the end users or consumers through advertising and market research. The pre-service strategies includes identifying the following target market, design, branding, market research, etc.
Market research can be defined as a strategic technique which typically involves the process of identifying, acquiring and analyzing informations about a business. It involves the use of product test, surveys, questionnaire, focus groups, interviews, etc.
Web analytics refers to a strategic process which typically involves the collection of data, as well as the study of user behavior in an attempt to enhance or boost market share and sales. It is divided into two main categories;
I. on-site Web analytics.
II. off-site Web analytics.
In this scenario, your tasks include identifying competitors, determining your company's market penetration and consulting market research sources. These tasks are examples of off-site Web analytics.
ou are using a GUI HTML editor to create a Webpage. How can you preview and test elements of your page while you are creating it?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A
By exporting the page to a separate testing application
B
By viewing the page in a browser during development
C
By publishing the page on the Web when it is finished
D
By viewing the page in the GUI screen during development
Answer:
I think its A B and C, A and B seems most probable, you should consult the website called stackoverflow
Explanation:
Is there only one option or multiple choice?
The rhythmic note that three beats is called a____half note.
Answer:
it is called a dotted half note
can you help me with this question please
Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_dict') as key-value pair. The program then asks if the user wants to enter more data (More data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. Note: Ignore the case where the name is already in the dictionary. Example: Name: pransh
Answer:
Explanation:
The following is written in Python and does as the question requested. It asks the user for the information and adds it to the dictionary (the_dict) then it asks the user if they want to add more info and keeps adding to the_dict until the user states no. Once that happens the program places the dictionary into a tuple and prints out the results.
the_dict = {}
test_tup = ()
while True:
key = input("Please enter a name: ")
value = input("Please enter a number: ")
the_dict[key] = value
answer = input("More data (y/n)?").lower()
if answer != 'y':
break
test_tup = list(test_tup)
test_tup.append(the_dict)
test_tup = tuple(test_tup)
print(test_tup)
What is used to prevent all vlans from going across a trunk?
qr code is more developed than barcode
While a barcode only holds information in the horizontal direction, a QR code does hold information in both horizontal and vertical directions. Due to this, a QR code holds hundreds of times more information than a barcode.
With that being said they have different purposes, and there about the same developed as each other, unless you count how much information they can store.
Consider the following field and incomplete method of some class. The method calcTotal is intended to return the sum of all values in vals.
private int[] vals;
public int calcTotal()
{
int total = 0;
/* missing code */
return total;
}
Which of the code segments shown below can be used to replace /* missing code */ so that calcTotal will work as intended?
I.
for (int i : vals)
{
total += i;
}
II.
for (int pos = vals.length; pos > 0; pos--)
{
total += vals[pos];
}
III.
int pos = 0;
while (pos < vals.length)
{
total += vals[pos];
pos++;
}
I only
II only
I and III
II and III
III only
Answer:
I and III
Explanation:
We need a solution that iterates through the each item in the vals array and sums them (cumulative sum). The result should be held in total.
I:
This one uses enhanced for loop (i refers to the each value in vals) and sums the values.
II:
This one uses for loop, but the loop is not constructed well. The control variable of the loop, pos, initially set the length of the vals and the loop iterates while pos is greater than 0. If vals have 10, 20, 30 as values, the length would be 3. In this case, vals[pos] when pos is 3, would give us an error because last index would be 2 in that scenario. Also, you can't access the first value because loop will stop when pos is 0.
III:
This one uses a while loop and iterates each value in the vals and sums them. Note that in this case, the values pos have will be 0, 1, 2 ..., length-1 - which are valid to access each item.
A license plate has 7 characters. Each character can be a capital letter or a digit except for 0. How many license plates are there in which no character appears more than once and the first character is a digit?
a. 9 P(35, 6)
b. 9 P(34,6)
c. 9.(35)^6
d. 9.(35)^6
Answer:
b. 9 P(34,6)
Explanation:
Since the 1st character of the number plate is the digit, therefore, there are nine possible ways to select them from digits 1 to 9.
And in the license plate there are 7 characters, the first character is counted before and the remaining 6 characters that can either be a digit or a letter has to be considered.
Now there are in total 34 symbols remaining form a total of 26 letters and 8 digits. They can be placed as 34x33x32x31x30x29 ways = P(34, 6) ways.
Therefore in total for all the characters there are 9 x P(34, 6) different ways.
What is result of executing the following code?
public class Question11 {
private static int x = 1;
public static void main(String[] args) {
int x = 5;
System.out.printf("local x in main is %d%n", x);
useLocalVariable();
useField();
useLocalVariable();
useField();
System.out.printf("%nlocal x in main is %d%n", x);
}
public static void useLocalVariable() {
int x = 25;
System.out.printf(
"%nlocal x on entering method useLocalVariable is %d%n", x);
++x;
System.out.printf(
"local x before exiting method useLocalVariable is %d%n", x);
}
public static void useField() {
System.out.printf(
"%nfield x on entering method useField is %d%n", x);
x *= 10; // modifies class Scope’s field x
System.out.printf(
"field x before exiting method useField is %d%n", x);
}
}
Answer:
Explanation:
With the main method int the question calling the useLocalVariable and useField variable various times and then also printing out the variable using the printf method. The output of executing this code would be the following...
local x in main is 5
local x on entering method useLocalVariable is 25
local x before exiting method useLocalVariable is 26
field x on entering method useField is 1
field x before exiting method useField is 10
local x on entering method useLocalVariable is 25
local x before exiting method useLocalVariable is 26
field x on entering method useField is 10
field x before exiting method useField is 100
local x in main is 5
Antivirus is a program that detects error.True or False.
Answer: false
Explanation:
Because it isn't true.
Let us build on the solution that we previously created and write a program that takes any number of values as input, and outputs the average, min, and max only if the input values were all numeric Ex If the input is 15 20 0 5 the output is 100.20 Use (1.0f) to format the output of the computed average Define and use in your program the following functions to make your code more modular • convert_str_to_numeric_1int-taken an input string, splits it into tokens, and returns the tokens stored in a list on all tokens were numeric, otherwise, returns an empty list • get_avg-if the input list is not empty and stores only numerical values, returns the average value of the elements, otherwise, returns • get_min if the input list is not empty and stores only numerical values, returns the minimum value in the list otherwise, returns • get_max of the input list is not empty and stores only numerical values, returns the maximum value in the list otherwise, returns None None None Hint. The string method atr. indigit() will help determine if an input string contains only the numbers 0-9 (see the Section on String mathadh
Answer:
Following are the code to these question:
def convert_str_to_numeric_list (numbers):#defining a method convert_str_to_numeric_list that holds number as a parameter
numbers_list = numbers.split ()#defining a list that hols list value by using splits method
for i in range (len (numbers_list)):#use loop for calculate the length of list
if (numbers_list[i].isdigit ()):#use if that check digits in list
numbers_list[i] = int (numbers_list[i])#convert list value into numbers
else:#else block
return[] #use return to return list v
return numbers_list #returning list
def get_avg (numbers_list):#defining a method get_avg that holds list in parameter
if (len (numbers_list) != 0):#use if to check lenght of the list is not equal to 0
return sum (numbers_list) / len (numbers_list)#use return to calculate average of the list
else: #use else block
return None #return None value
def get_min (numbers_list):#defining get_min method that holds list in parameter
if (len (numbers_list) != 0):#use if to check lenght of the list is not equal to 0
return min (numbers_list) #use return to calculate the minimum element in list
else: #use else block
return None #return None
def get_max (numbers_list):#defining get_max method that holds list in parameter
if (len (numbers_list) != 0): #use if to check lenght of the list is not equal to 0
return max (numbers_list) #return minimum number in the list elements
else:# use else block
return None #return None
numbers = input () #defining numbers that use input method to input value
numbers_list = convert_str_to_numeric_list (numbers) #use list that pass hold the method value
average = get_avg (numbers_list)#defining average variable that calls get_avg method
minimum = get_min (numbers_list)#defining minimum variable that calls get_min method
maximum = get_max (numbers_list)#defining maximum variable that calls get_max method
if (len (numbers_list) != 0):#if to check lenght of the list is not equal to 0
print ("{:.0f} {} {}".format (average, minimum, maximum)) #print calculated values.
Output:
15 20 0 5
10 0 20
Explanation:
In this code, a method "convert_str_to_numeric_list" is declared that holds a numbers variable as a parameter and inside this, a list is declared that
that splits the lists and in the for loop, it checks the length of the array and converts the list value into the numbers, and returns its values.
In the next step, "get_avg, get_min, and get_max" three methods are declared, that check the length of the list and return its respective values.
At the last, the numbers are declared that inputs values and passes into the list and use "average, minimum, and maximum" variable to call the method holds its value and at the last, it uses the print method to print its values.
On the MarketingConsultants worksheet, in cells D10:H13, use a PMT function to calculate the end of the month payment amount. Enter one formula that can be entered in cell D10 and filled to the remaining cells. To calculate the amount for the pv argument, subtract the down payment amount from the retainer amount. The formula results should be positive.
Hiring Marketing Consultants Analysis ainted Paradise RESORT&SPA $ 125,000 5 4 Retainer Amount Term (Years) Monthly Loan Payments Down Payment $ 10,000 15,000 20,000 $25,000$30,000 2.0%, 2.5% 3.0% 3.5%. 10 12 13 15 16
Answer:
sdddddddde22
Explanation:
Question 12)
What element should the introduction of an effective essay have?
A.
a call to action
B.
a main idea statement
C.
a summary of the topic
D.
evidence to support the details
E.
details to support the topic
Answer:
The introduction of your essay should have the summary of your topic.
Explanation:
You obviously need to know what to write for your essay otherwise you would have no ideas, clues, evidence, or any elaboration for what your writing about. Hope this helps
How does an online discussion group differ from one that is held face-to-face?
There is no need for group roles when holding online meetings.
Online discussion groups do not allow members to develop critical-thinking skills.
Group members are more likely to bond together as a group online than they would when meeting face-to-face.
Facilitating an online conversation may require even more work, so that participants continue engaging with one another online.
Answer: they always will have a different thinkage from others
Explanation:Some people need actual in person learning for better grades it also keeps them from getting distracted easily, they have different brains in everyone in the world everyone thinks, acts and talks in different ways some people dont need in person school because they would rather be online wich are both ok so yes they do bond together online but better in person.
Online discussion group differ from one that is held face-to-face as Group members are more likely to bond together as a group online than they would when meeting face-to-face. Thus, option C is correct.
What is software organization?A system that defines how specific activities, in this case, the software development process, are directed to achieve corporate goals is referred to as an organizational structure. These activities could include putting rules, roles, and responsibilities in place.
There are four basic modes of collaboration, as illustrated by the exhibit "The Four Ways to Collaborate": a closed and authoritarian network (an elite circle), an open and hierarchical connectivity (an innovation mall), an open and flat network (an innovation community), and a shuttered and flat network (a consortium).
Groupware is software that allows a group of people to work together on the same system or application, regardless of where they are. Email, newsgroups, and many more are examples of groupware applications.
Thus, option C is correct.
For more details regarding collaborative applications, visit:
brainly.com/question/8453253
#SPJ3
Which of the following is the best reason for aspiring visual artists and designers to create greeting cards? a-popularity of greeting cards b-innovative design techniques used in cards c-ease of production d-Low cost of production
Answer:
ease of production
Explanation:
1) Raj wants to create a presentation of 20 slides on MS PowerPoint. He wants that all the slides should have uniform background and theme. Suggest him which option in MS PowerPoint makes it possible.
Help asap no links to other sites please
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa
AAAAA
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
a
a
a
a
aa
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
aa
a
aa
a
a
aa
aa
a
a
aa
a
a
aa
a
a
a
a
a
a
aa
aa
aa
aa
a
aaaaaaaaaaaaaa
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
we are writing a program that takes a word and checks how many letters
Answer:
def word_count(word):
return len(word)
a = word_count('scream')
print(a
Explanation:
Using python3:
def word_count(word):
#defines a function named word_count which takes in a single argument which is the word to be counted
return len(word)
#The only thing the function does is to count the number letters in the word.
For instance :
return len(word)
Calling the function and attaching it to the variable named a
Counts the number of letters in scream and assigns the result to a
a = word_count('scream')
print(a)
a gives an output of 6 ; which is the number of letters in scream.
g Consider the turning point problem again, but this time you are given a sequence of at least three integers, which consists of a decreasing subsequence followed by an increasing subsequence. Using the divide and conquer technique, develop a recursive algorithm that finds the index of the turning point in the sequence (that is, the point where it transitions from a decreasing subsequence to an increasing subsequence). For example, in the sequence [43 30 16 10 7 8 13 22], the integer 7 is the turning point and its index is equal to 4 (assuming the starting index is 0). So, the algorithm should return 4
Answer:
Explanation:
The following code is written in Python, it creates a recursive function that takes in a list as a parameter, then compares the first two items in the list if the first is greater, it increases the index by one and calls the function again. This is done until the turning point is found, it then prints out the position of the turning point int the list.
def find_turning_point(list, x=0):
if list[x] > list[x + 1]:
x += 1
return find_turning_point(list, x)
else:
return "The turning point position is: " + str(x)
An attacker has hidden an NFC reader behind an NFC-based kiosk in an airport. The attacker uses the device to capture NFC data in transit between end user devices and the reader in the kiosk. She then uses that information to masquerade as the original end user device and establish an NFC connection to the kiosk. What kind of attack has occurred in this scenario
Answer:
Nfc relay attack
Explanation:
The NFC relay attack occurs when data is extracted by an attacker who puts himself in the middle of two parties having a communication with each other. As the message gets to a party, the attacker gets it and modifies it to their taste then passes it on.
This attacker in this question is extracting data by establishing communication between end user devices and reader in the kiosk
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (2 pts) Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs. Enter integer: 99 Enter double: 3.77 Enter character: 2 Enter string: Howdy 99 3.77 z Howdy (2) Extend to also output in reverse (1 pt) Enter integer: 99 Enter double 3.77 Enter characteri Enter string: Howdy 99 3.772 Howdy Howdy z 3.77 99 (3) Extend to cast the double to an integer, and output that integer (2 pts) 0 en soa Enter integer: 99 Enter double: 3.77 Enter character: 2 Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3 LAB ACTIVITY 14.1.1: Prog 1: Variables, input, and casting 0/5 BasicInput.java Load default template. 1 ort java.util.Scanner: 2 3 lic class Basic Input I 4 public static void main(String args) { 5 Scanner ser-new Scanner(System.in); 6 int userint; 7 double userDouble; B // FTOME Define chor and string variables similarly 9 char UserChar: 10 String userString: 11 12 System.out.println("Enter integer"): 13 user Int - ser.nextInto: 14 15 // FTXMC (1): Finish reading other items inte variables, then output the four values on a single line separated by a space
Answer:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int intgVal; double dblVal; char chrVal; String strVal;
System.out.print("Enter integer: ");
intgVal = input.nextInt();
System.out.print("Enter double: ");
dblVal = input.nextDouble();
System.out.print("Enter character: ");
chrVal = input.next().charAt(0);
input.nextLine();
System.out.print("Enter string: ");
strVal = input.nextLine();
System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);
System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);
int IntValue = (int) dblVal;
System.out.print("Cast to an integer: "+IntValue);
}
}
Explanation:
See attachment for complete program where comments were used to explain each line of the program
Point out the wrong statement:
A. In theory, any application can run either completely or partially in the cloud.
B. The location of an application or service plays a fundamental role in how the application must be written.
C. An application or process that runs on a desktop or server is executed coherently, as a unit, under the control of an integrated program.
D. None of the mentioned.
Answer:
D. None of the mentioned.
Explanation:
A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.
This ultimately implies that, a software can be defined as a computer program or application that comprises of sets of code for performing specific tasks on the system.
All of the following statements about a software application or program are true and correct;
A. In theory, any application can run either completely or partially in the cloud.
B. The location of an application or service plays a fundamental role in how the application must be written.
C. An application or process that runs on a desktop or server is executed coherently, as a unit, under the control of an integrated program.
You can write a function to find Fibonacci numbers using recursion.
How do you find the next number?
add five to the previous number
add one to the previous number
multiply the two previous numbers
add the two previous numbers
Answer:
Add the two previous numbers
Explanation:
A recursive definition of the Fibonacci sequence would look like this, in python:
def fibonacci(n)
if n <= 1:
return n
else:
return(fibonacci(n-1) + fibonacci(n-2))