Answer:
Here is the JAVA program:
public class Main { //class name
public static void main(String[] args) { //start of main method
//sets all boolean type variables spades, hearts diamonds and clubs to false initially
boolean spades = false;
boolean hearts = false;
boolean diamonds = false;
boolean clubs = false;
String[] deck = new String[4]; //to store card sequence
int index = 0; //to store index position
int NoOfPicks = 0; //to store number of picks (picks count)
while (!spades || !hearts || !diamonds || !clubs) { //loop starts
String card = printCard(getRandomCard()); //calls printCard method by passing getRandomCard method as argument to it to get the card
NoOfPicks++; //adds 1 to pick count
if (card.contains("Spades") && !spades) { //if that random card is a card of Spades and spades is not false
deck[index++] = card; //add that card to the index position of deck
spades = true; //sets spades to true
} else if (card.contains("Hearts") && !hearts) { //if that random card is a card of Hearts and hearts is not false
deck[index++] = card;
hearts = true; //sets hearts to true
} else if (card.contains("Diamond") && !diamonds) { //if that random card is a card of Diamond and diamonds is not false
deck[index++] = card;
diamonds = true; //sets diamonds to true
} else if (card.contains("Clubs") && !clubs) { if that random card is a card of Clubs and clubs is not false
deck[index++] = card;
clubs = true; } } //sets clubs to true
for (int i = 0; i < deck.length; i++) { //iterates through the deck i.e. card sequence array
System.out.println(deck[i]); } //prints the card number in deck
System.out.println("Number of picks: " + NoOfPicks); } //prints number of picks
public static int getRandomCard() { //gets random card
return (int) (Math.random() * 52); } //generates random numbers of 52 range
public static String printCard(int cardNo) { //displays rank number and suit
String[] suits = { "Spades", "Hearts", "Diamonds", "Clubs", }; //array of suits
String[] rankCards = { "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10",
"Jack", "Queen", "King" }; //array of rank
int suitNo = cardNo / 13; //divides card number by 13 and stores to suitNo
int rankNo = cardNo % 13; //takes modulo of card number and 13 and store it to rankNo
return rankCards[rankNo] + " of " + suits[suitNo]; }} //returns rankCard at rankNo index and suits at suitNo index
Explanation:
The program is explained in the comments attached with each line of code. The screenshot of the program along with its output is attached.
which of the following is a common security misconfiguration an attacker might use to gain access to a website or application?
Default passwords and accounts are activated— It is a typical security mistake to use vendor-supplied defaults for system accounts and passwords, which could provide attackers access to the system without authorization.
Guest, admin, and password are a few examples of default passwords. These single default passwords, which are frequently used by suppliers, are easily discoverable online using search engines or websites that gather lists. Consequently, if left unaltered, they pose a serious security risk. Most routers typically use "admin" and "admin" as their default username and password. The router's manufacturer may change these credentials, though. Administrator Password: This password, which was established by E-CORPORATION, is needed by the system in order for the user to complete the transaction. To get the three-dot menu, open the Chrome browser and tap it. Select Autofill > Password Manager from the menu in the upper-left corner.
Learn more about Default passwords here
https://brainly.com/question/30035709
#SPJ4
Which tool allows multiple users to dynamically update a document at the same time? Question 3 options: Google Docs OneDrive Excel Dropbox
Answer:
Excel
Explanation:
what is python programming?
Answer:
Explanation:
Python is a popular programming language that lets you work quickly and integrate systems more effectively. It can be used for a wide range of tasks, including web development, data analysis, artificial intelligence, and more. Python is known for its readability and ease of use, making it a great language for beginners to learn. It has a large and supportive community of developers who contribute to its development and provide resources for learning and using the language.
Pretend you work with a lot of different documents in an internship with a software development company. What kinds of actions can you take to keep your files, folder names, folder structure, and yourself organized? Be thorough in your answer.
In the case above, I will categories my files and also my folders using as names and structures. The file name will help me to know identify the file in fast time and i will also use descriptive file names.
The ways that i will use in the file management are:
I will use a single place for all kinds of documents. I will make a Folders in a kind of Logical Hierarchy. I will also Nest Folders inside Folders. I will use the File Naming Conventions, etc.What is file structure?A file structure is known to be the ways or combination of depiction for data in files.
Hence, In the case above, I will categories my files and also my folders using as names and structures. The file name will help me to know identify the file in fast time.
Learn more about files from
brainly.com/question/1178560
#SPJ1
If 294.00 units are made and demand is 287.00. Your fixed expenses are $1257.00. Your variable cost per unit is $2.25. Your Sales price is 6.49. The variable expenses for the day is?
If the 294.00 units are made and the cost per unit is $2.25 then variable expenses for the day is $661.5.
Given that 294.00 units are made and the variable cost per unit is $2.25
We have to find variable expenses for the day.
Total variable expenses for the day are a product of the output and the variable cost per unit.
So the variable expenses = no. of output x variable cost per unit
Variable expenses = 294 x 2.25
Variable expenses = 661.5
Hence the variable expenses for the day is $661.5
Learn more about variable expenses here: https://brainly.com/question/8225307
#SPJ10
which type of network is the internet? choose the answer
Answer:
WAN or wide area network
Explanation:
The Internet is the most basic example of a WAN. It is connecting all computers together around the world.
If I am designing an application, which code to I input to create a link
Answer:
\({ \tt{ < a \: href = url > < a > }}\)
The last must be a closing tag
Why are social values important to driving?
Pseudocode finding the sum of the number 12, 14, 16
Answer:
Pseudocode:
1. Initialize a variable named 'sum' and set it to 0.
2. Create an array named 'numbers' containing the numbers 12, 14, and 16.
3. Iterate over each number in the 'numbers' array.
3.1 Add the current number to the 'sum' variable.
4. Print the value of 'sum'.
Alternatively, here's an example of pseudocode using a loop:
1. Initialize a variable named 'sum' and set it to 0.
2. Create an array named 'numbers' containing the numbers 12, 14, and 16.
3. Initialize a variable named 'index' and set it to 0.
4. Repeat the following steps while 'index' is less than the length of the 'numbers' array:
4.1 Add the value at the 'index' position in the 'numbers' array to the 'sum' variable.
4.2 Increment 'index' by 1.
5. Print the value of 'sum'.
Explanation:
1st Pseudocode:
1. In the first step, we initialize a variable called 'sum' and set it to 0. This variable will be used to store the sum of the numbers.
2. We create an array named 'numbers' that contains the numbers 12, 14, and 16. This array holds the numbers you want to sum.
3. We iterate over each number in the 'numbers' array. This means we go through each element of the array one by one.
3.1 In each iteration, we add the current number to the 'sum' variable. This way, we accumulate the sum of all the numbers in the array.
4. Finally, we print the value of the 'sum' variable, which will be the sum of the numbers 12, 14, and 16.
2nd Pseudocode using a loop:
1. We start by initializing a variable called 'sum' and set it to 0. This variable will store the sum of the numbers.
2. Similar to the first pseudocode, we create an array named 'numbers' containing the numbers 12, 14, and 16.
3. We initialize a variable called 'index' and set it to 0. This variable will be used to keep track of the current index in the 'numbers' array.
4. We enter a loop that will repeat the following steps as long as the 'index' is less than the length of the 'numbers' array:
4.1: In each iteration, we add the value at the 'index' position in the 'numbers' array to the 'sum' variable. This way, we accumulate the sum of all the numbers in the array.
4.2: We increment the 'index' by 1 to move to the next position in the array.
5. Finally, we print the value of the 'sum' variable, which will be the sum of the numbers 12, 14, and 16.
(Reverse number) Write a program that prompts the user to enter a four-digit inte- ger and displays the number in reverse order. Here is a sample run:
Answer:
The program in Python is as follows:
num = int(input("4 digit number: "))
numstr = str(num)
if(len(numstr)!=4):
print("Number must be 4 digits")
else:
numstr = numstr[::-1]
num = int(numstr)
print(num)
Explanation:
This prompts user for input
num = int(input("4 digit number: "))
This converts the input number to string
numstr = str(num)
This checks if number of digits is or not 4
if(len(numstr)!=4):
If not, the following message is printed
print("Number must be 4 digits")
else:
If digits is 4,
This reverses the string
numstr = numstr[::-1]
This converts the reversed string to integer
num = int(numstr)
This prints the reversed number
print(num)
what are reserved words with a programming language
This is a syntactic definition, and a reserved word may have no user-defined meaning. Often found in programming languages and macros, reserved words are terms or phrases appropriated for special use that may not be utilized in the creation of variable names. For example "print" is a reserved word because it is a function in many languages to show text on the screen
Write the remove_evens() function, which receives a list of integers as a parameter and returns a new list of integers containing only the odd numbers from the original list. The main program outputs values of the returned list. Hint: If the original list has even numbers, then the new list will be smaller in length than the original list and should have no blank elements. Ex: If the list passed to the remove_evens() function is [1, 2, 3, 4, 5, 6, 7, 8, 9], then the function returns and the program output is:
The program is an illustration of loops.
Loops are used to perform repetitive operations
The function in Python where comments are used to explain each line is as follows:
#This defines the function
def remove_event(mylist):
#This creates a new list
newList = []
#This iterates through the list
for i in mylist:
#This checks if the current list element is not even
if not i%2 == 0:
#If yes, the element is appended to the new list
newList.append(i)
#This returns the new list
return(newList)
Read more about similar programs at:
https://brainly.com/question/18269390
How is workflow defined? (IMAGE ATTACHED)
The sequence of steps one follows from start to finish of a work process is how workflow is defined. (Option C)
What is the rationale for the above response?Workflow refers to the sequence of steps or tasks that are performed in order to complete a particular work process, often in a specific order or with specific dependencies between steps.
A workflow can involve the interaction between hardware, software, and humans, but it is primarily defined by the steps that must be followed to achieve a specific outcome. In this sense, a workflow can be thought of as a structured or organized way of working, designed to optimize efficiency and productivity.
Learn more about workflow:
https://brainly.com/question/14399047
#SPJ1
which of the following is not the correct definition of an operating system
A.
it controls all other execution in a computer
B.
interface between hardware and application programs
C.
its a platform for ensuring that other executions has taken place
D.
maintains consistency of data loss during execution
The correct answer is C. An operating system is not a platform for ensuring that other executions have taken place. An operating system is a software program that manages the hardware and software resources of a computer and provides common services for computer programs. It acts as an interface between the hardware and application programs and controls all other execution in a computer. It also maintains consistency of data during execution.
Before you post anything online what are at least 5 things you should keep in mind?
Explain how the entity relationship (ER) model helped produce a more structured
relational database design environment.
The way that the entity relationship (ER) model helped produce a more structured relational database design environment is that
A database's primary entities and their relationships can be determined with the aid of an entity relationship model, or ERM. The role of the ERM components is easier to comprehend because they are graphically portrayed.
It is simple to translate the ERM to the tables and attributes of the relational database model using the ER diagram. The full set of needed database structures is generated by this mapping procedure, follows a set of clearly defined processes which are:
uses clearly defined images and rules to represent reality.the theoretical basisbeneficial for communicationTranslate to any DBMS typeHow does the ER model aid in relational database design?A visual representation of relational databases is an entity relationship diagram (ERD). Relational databases are modeled and designed using ERDs.
The Entity Relationship Model (ERM), which enables designers to perceive entities and connections visually, contributed to the creation of a more structured relational database design environment.
Therefore, Instead of defining the structures in the text, it is easier to understand them graphically.
Learn more about entity relationship (ER) model from
https://brainly.com/question/14424264
#SPJ1
Write a program to compute the area of a circle some 'n' times. You must accept n and r from the user. Area is calculated using (22/7.0)*r*r - where r is the radius. Implement using value-returning functions. Hint: create a function to calculate area taking r as a parameter. In the main() function, ask for n and create a loop where you input r and invoke the area function n times.
In python:
def calculateRadius(r):
return (22 / 7) * r * r
def main():
quantity = int(input("How many times do you want to calculate the are? "))
radius = float(input("What's the radius of your circle? "))
i = 0
while i < quantity:
calculateRadius(radius)
i += 1
if __name__ == "__main__":
main()
I hope this helps!
ill try to post the program needed in comments
This assignment will use Practical Assignment-7 as a foundation. Modify the .py resulted fron Practical Assignment 7 to meet the following requirements:
- If the file name that the user inputs does not exist in the folder, the user should be asked to try again two times. If the input file is still missing after the third attempt, the program should exit with a message;
- Automatically delete the original file after the encryption is done; use the option where the deleted file is not recoverable;
- For the option requiring a password to encrypt and decrypt, if the decryption password is wrong, the user should be asked to try again two times. If the password is still wrong after the third attempt, the program should exit with a message;
Answer:
Explanation:
what program do we use for ths
Objective a right turn true or false?
descriptive paragraph about a forest beside a lake
consider the following import statement in python, where statsmodels module is called in order to use the proportions ztest method. what are the inputs to proportions ztest method? select one. from statsmodels.stats.proportion import proportions ztest
The inputs are mainly the count of observations that meet a condition (counts), total number of observations (nobs), Hypothesized value of population proportion (value).
How can the inputs to proportions calculated using z test method?The z test is performed using the following steps:
The null and alternative hypotheses should be set up.Using the z table and alpha level, determine the crucial value.Make a z statistic calculation.To determine whether to reject or not to reject the null hypothesis, compare the crucial value and the test statistic.So, the inputs are mainly the count of observations that meet a condition (counts), total number of observations (nobs), Hypothesized value of population proportion (value).
To know more about z test, check out:
https://brainly.com/question/17144617
#SPJ4
.
e Highlight
fogy
ст)
4 uses of information
communication technology in the health sector
Answer: See explanation
Explanation:
The uses of information
communication technology in the health sector include:
• Improvement in the safety of patients through direct access to case story.
• Keeping track of the progress of the patient.
• Checking of the treatments for a disease it illness online.
• It's also vital for the electronic storage of the medical data.
In theory, a hacker with a small but powerful directional antenna could access a wireless network from more than one mile away. In a real-world situation, what is the more likely range involved
Python question
The following code achieves the task of adding commas and apostrophes, therefore splitting names in the list. However, in the case where both first and last names are given how would I "tell"/write a code that understands the last name and doesn't split them both. For example 'Jack Hansen' as a whole, rather than 'Jack' 'Hansen'.
names = "Jack Tomas Ponce Ana Mike Jenny"
newList = list(map(str, names.split()))
print(newList) #now the new list has comma, and apostrophe
Answer:
You can use regular expressions to match patterns in the names and split them accordingly. One way to do this is to use the re.split() function, which allows you to split a string based on a regular expression.
For example, you can use the regular expression (?<=[A-Z])\s(?=[A-Z]) to match a space between two capital letters, indicating a first and last name. Then use the re.split() function to split the names based on this regular expression.
Here is an example of how you can use this approach to split the names in your list:
(Picture attached)
This will give you the output ['Jack', 'Tomas', 'Ponce', 'Ana', 'Mike', 'Jenny', 'Jack Hansen']. As you can see, the name "Jack Hansen" is not split, as it matches the pattern of first and last name.
It's worth noting that this approach assumes that all first and last names will have the first letter capitalized and the last names capitalized too. If this is not the case in your data, you may need to adjust the regular expression accordingly.
Question 2 of 25
How could a video's file size be reduced so that it will take up less space on a
computer's hard drive?
A. By shooting it at a lower resolution
B. By shooting it at a higher resolution
C. By shooting it at a higher frame rate
D. By sampling the sound at the maximum rate
You are a salesperson and you need to sell me a bucket with 10 holes in it. The bucket can do anything.You however can't change the the price.sell it
Answer:
Stop being such a la*y ***k and figure it out yourself.
Answer:
Explanation:
1. Which is the odd one out?
P
Answer: I don’t quite understand what you are asking.
Explanation:
Answer:
me either
Explanation:
Many individuals and organizations are choosing cloud storage for their important files. Discuss the pros and cons of cloud storage for both personal files and business files. Many individuals and organizations are choosing cloud storage for their important files. Discuss the pros and cons of cloud storage for both personal files and business files. What inputs and outputs are needed to support the storage environment
Answer:
Pros of cloud storage
Files can be accessed remotely without having to be connected to a company's intranetSecurity and file backups are managed by the cloud storage company, frees up employees time applying updates and other maintenance tasks.Usually billed monthly which allows for a lower initial startup costCons of cloud storage
File security relies upon trust in the cloud storage providerLong term cost could be higher than storing files yourselfRequires an internet connection to access filesMatch the different aspects of the marketing information systems to the scenarios that portray them.
1. Marketing intelligence system
2. Internal reporting system
3. Marketing model
4. Marketing research system
A. includes number of orders received, stock holdings, and sales invoices
B. MIS collects, regulates, and analyzes data for marketing plan
C. gathers information such as demographic data
D. includes time series, sales model, and linear programming
Answer:
1. Marketing intelligence system - C
2. Internal reporting system - A
3. Marketing model - D
4. Marketing research system - B
Explanation:
What are the missing words in the program?
divide(numA,numB):
numA/numB
If you just want to get the quotient of numA and numB from the function, it would look like this:
def divide(numA, numB):
return numA/numB
If you want to get the quotient of numA and numB from the function and then print that value to the screen, it would look like this:
def divide(numA, numB):
return numA/numB
print(divide(1,1))
You can replace those 1's with any number you want.
The missing words in the program are:
def divide(numA, numB):
return numA/numB
If you want to get the quotient of numA and numB from the function and then print that value to the screen, it would look like this:
def divide(numA, numB):
return numA/numB
print(divide(1,1))
What is program?
A computer program is a sequence or collection of instructions written in a programming language and executed by a computer. Software contains computer programs as well as documentation and other intangible components. Source code refers to a computer program in its human-readable form. Because computers can only execute native machine instructions, source code requires the execution of another computer program. As a result, using the language's compiler, source code can be converted to machine instructions. The resulting file is referred to as an executable. Source code may also be executed within the language's interpreter. If the executable is called, the operating system loads it into memory and starts a process.
To learn more about program
https://brainly.com/question/22654163
#SPJ2