Answer:
my sql
Explanation:
try with mysql
and database build
At a coffee shop, a coffee costs $1. Each coffee you purchase, earns one star. Seven stars earns a free coffee. In turn, that free coffee earns another star. Ask the user how many dollars they will spend, then output the number of coffees that will be given and output the number of stars remaining. Hint: Use a loop
Answer:
Explanation:
The following is written in Python, no loop was needed and using native python code the function is simpler and more readable.
import math
def coffee():
dollar_amount = int(input("How much money will you be using for your purchase?: "))
free_coffees = math.floor(dollar_amount / 7)
remaining_stars = dollar_amount % 7
print("Dollar Amount: " + str(dollar_amount))
print("Number of Coffees: " + str(dollar_amount + free_coffees))
print("Remaining Stars: " + str(remaining_stars))
Goal: The campus squirrels are throwing a party! Do not ask. They need you to write a method that will determine whether it will be successfull (returns true) or not (returns false). The decision will be based on int values of the two parameters "squirrels" and "walnuts" representing respectively the number of squirrels attending the party and the numbers of walnuts available to them. The rules for making that determination are detailed below. Variables declarations & initialization: Boolean variable named "result", initialized to false. Steps for the code: First, if less than 1 squirrel attends, then "result" is assigned false. Else, we consider the following conditions: If we have less than, or exactly, 10 squirrels attending: Then: If we have less than 15 walnuts, Then: "result" is set to false. Else: if we have less than, or exactly, 30 walnuts Then: "result" is set to true. Else: "result" is set to false. Else: If less than, or exactly, 30 squirrels are attending Then: If the number of walnuts is more or equal to twice the number of squirrels attending Then: "result" is set to true Else: "result" is set to false Else: If the number of walnuts is equal to 60 plus the number of squirrels attending minus 30 Then: "result" is set to true Else: "result" is set to false
Answer:
Following are the code to the given question:
#include<iostream>// header file
using namespace std;
int main()//main function
{
int squirrels, walnuts;//defining integer variable
bool result = false; //defining a bool variable that holds a false value
cout<<"Enter the number of squirrels"<<endl;//print message
cin>>squirrels; // input integer value
cout<<"Enter the number of walnuts"<<endl;//print message
cin>>walnuts; // input integer value
if(squirrels < 1)//use if variable that checks squirrels value less than 1
{
result = false;//use result variable that holds false value
}
else//defining else block
{
if(squirrels <= 10)//use if variable that checks squirrels value less than equal to 10
{
if(walnuts < 15) //use if variable that checks walnuts value less than 15
result = false;//use result variable that holds false value
else if(walnuts <= 30)//use elseif block that checks walnuts less than equal to 30
result = true; //use result variable that holds true value
else //defining else block
result = false;//use result variable that holds false value
}
else if(squirrels <= 30)//use elseif that checks squirrels value less than equal to 30
{
if(walnuts >= 2*squirrels) //use if block to check walnuts value greater than equal to 2 times of squirrels
result = true; //use result variable that holds true value
else//defining else block
result = false;//use result variable that holds false value
}
else if(walnuts == 60 + squirrels - 30)//using elseif that checks walnuts value equal to squirrels
result = true;//use result variable that holds true value
else //defining else block
result = false;//use result variable that holds false value
}
if(result)//use if to check result
cout<<"True";//print True as a message
else //defining else block
cout<<"False";//print False as a message
return 0;
}
Output:
Enter the number of squirrels
10
Enter the number of walnuts
30
True
Explanation:
In this code, two integer variable "squirrels and walnuts" and one bool variable "result" is declared, in which the integer variable use that input the value from the user-end, and inside this the multiple conditional statements is used that checks integer variable value and use the bool variable to assign value as per given condition and at the last, it uses if block to check the bool variable value and print its value.
Chris recently received an array p as his birthday gift from Joseph, whose elements are either 0 or 1. He wants to use it to generate an infinite long superarray. Here is his strategy: each time, he inverts his array by bits, changing all 0 to 1 and all 1 to 0 to get another array, then concatenate the original array and the inverted array together. For example, if the original array is [0,1,1,0] then the inverted array will be [1,0,0,1] and the new array will be [0,1,1,0,1,0,0,1]. He wonders what the array will look like after he repeat this many many times.
He ask you to help him sort this out. Given the original array pp of length ????n and two indices a,b (????≪????≪????, means much less than) Design an algorithm to calculate the sum of elements between a and b of the generated infinite array p^, specifically, ∑????≤????≤????p????^. He also wants you to do it real fast, so make sure your algorithm runs less than O(b) time. Explain your algorithm and analyze its complexity.
Answer:
its c
Explanation:
describe the major elements and issues with agile development
Answer:
water
Explanation:
progresses through overtime
Write a SELECT statement that returns these columns from the Orders table: The CardNumber column The length of the CardNumber column The last four digits of the CardNumber columnWhen you get that working right, add the column that follows to the result set. This is more difficult because the column requires the use of functions within functions. A column that displays the last four digits of the CardNumber column in this format: XXXX-XXXX-XXXX-1234. In other words, use Xs for the first 12 digits of the card number and actual numbers for the last four digits of the number.selectCardNumber,len(CardNumber) as CardNumberLegnth,right(CardNumber, 4) as LastFourDigits,'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumberfrom Orders
Answer:
SELECT
CardNumber,
len(CardNumber) as CardNumberLength,
right(CardNumber, 4) as LastFourDigits,
'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber
from Orders
Explanation:
The question you posted contains the answer (See answer section). So, I will only help in providing an explanation
Given
Table name: Orders
Records to select: CardNumber, length of CardNumber, last 4 digits of CardNumber
From the question, we understand that the last four digits should display the first 12 digits as X while the last 4 digits are displayed.
So, the solution is as follows:
SELECT ----> This implies that the query is to perform a select operation
CardNumber, ---> This represents a column to read
len(CardNumber) as CardNumberLength, -----> len(CardNumber) means that the length of card number is to be calculated.
as CardNumberLength implies that an CardNumberLength is used as an alias to represent the calculated length
right(CardNumber, 4) as LastFourDigits, --> This reads the 4 rightmost digit of column CardNumber
'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber --> This concatenates the prefix XXXX-XXXX-XXXX to the 4 rightmost digit of column CardNumber
as FormattedNumber implies that an FormattedNumber is used as an alias to represent record
from Orders --> This represents the table where the record is being read.
1. P=O START: PRINT PP = P + 5 IFP
<=20 THEN GOTO START: * what is output
Answer:
0
5
10
15
20
Explanation:
P=O should be P=0, but even with this error this is the output.
When P reaches 20 it will execute the loop once more, so 20 gets printed, before getting increased to 25, which will not be printed because then the loop ends.
How are BGP neighbor relationships formed
Automatically through BGP
Automatically through EIGRP
Automatically through OSPF
They are setup manually
Answer:
They are set up manually
Explanation:
BGP neighbor relationships formed "They are set up manually."
This is explained between when the BGP developed a close to a neighbor with other BGP routers, the BGP neighbor is then fully made manually with the help of TCP port 179 to connect and form the relationship between the BGP neighbor, this is then followed up through the interaction of any routing data between them.
For BGP neighbors relationship to become established it succeeds through various phases, which are:
1. Idle
2. Connect
3. Active
4. OpenSent
5. OpenConfirm
6. Established
Computer programming
A signal has a wavelength of 1 11m in air. How far can the front of the wave travel during 1000 periods?
Answer:
A signal has a wavelength of 1 μm in air
Explanation:
looked it up
Which of the following parameters is optional sample(a,b,c,d=7
The optional Parameter is D as it is said to be assigned an integer value of 7.
What are optional parameters?This is known to be a process that is made up of optional choices that one do not need to push or force so as to pass arguments at their set time.
Note that The optional Parameter is D as it is said to be assigned an integer value of: 7 because it implies that one can use the call method without pushing the arguments.
Learn more about Parameter from
https://brainly.com/question/13151723
#SPJ2
what does the
command do
An External Style Sheet uses the ________ file extension.
Answer:
css file extension
Explanation:
The question is straightforward and requires a direct answer.
In web design and development, style sheets are written in css.
This implies that they are saved in .css file extension.
Hence, fill in the gap with css
Research: Using the Internet or a library, gather information about the Columbian Exchange. Takes notes about the specific goods and diseases that traveled back and forth across the Atlantic, as well the cultural and political changes that resulted. Pay special attention to the indigenous perspective, which will most likely be underrepresented in your research.
Answer:
Small pox, cacao, tobacco, tomatoes, potatoes, corn, peanuts, and pumpkins.
Explanation:
In the Columbian Exchange, transportation of plants, animals, diseases, technologies, and people from one continent to another held. Crops like cacao, tobacco, tomatoes, potatoes, corn, peanuts, and pumpkins were transported from the Americas to rest of the world. Due to this exchange, Native Americans were also infected with smallpox disease that killed about 90% of Native Americans because this is a new disease for them and they have no immunity against this disease. Due to this disease, the population of native Americans decreases and the population of English people increases due to more settlement.
Suppose you design a banking application. The class CheckingAccount already exists and implements interface Account. Another class that implements the Account interface is CreditAccount. When the user calls creditAccount.withdraw(amount) it actually makes a loan from the bank. Now you have to write the class OverdraftCheckingAccount, that also implements Account and that provides overdraft protection, meaning that if overdraftCheckingAccount.withdraw(amount) brings the balance below 0, it will actually withdraw the difference from a CreditAccount linked to the OverdraftCheckingAccount object. What design pattern is appropriate in this case for implementing the OverdraftCheckingAccount class
Answer:
Strategy
Explanation:
The strategic design pattern is defined as the behavioral design pattern that enables the selecting of a algorithm for the runtime. Here the code receives a run-time instructions regarding the family of the algorithms to be used.
In the context, the strategic pattern is used for the application for implementing OverdraftCheckingAccount class. And the main aspect of this strategic pattern is the reusability of the code. It is behavioral pattern.
37) Which of the following statements is true
A) None of the above
B) Compilers translate high-level language programs into machine
programs Compilers translate high-level language programs inton
programs
C) Interpreter programs typically use machine language as input
D) Interpreted programs run faster than compiled programs
Answer:
B
Explanation:
its b
Answer:
A C E
Explanation:
I got the question right.
. Suppose an instruction takes 1/2 microsecond to execute (on the average), and a page fault takes 250 microseconds of processor time to handle plus 10 milliseconds of disk time to read in the page. (a) How many pages a second can the disk transfer? (b) Suppose that 1/3 of the pages are dirty. It takes two page transfers to replace a dirty page. Compute the average number of instructions between page fault that would cause the system to saturate the disk with page traffic, that is, for the disk to be busy all the time doing page transfers.
Answer:
a. 100.
b. 31500.
Explanation:
So, we are given the following data which is going to help in solving this particular question.
The time required to execute (on the average) = 1/2 microsecond , a page fault takes of processor time to handle = 250 microseconds and the disk time to read in the page = 10 milliseconds.
Thus, the time taken by the processor to handle the page fault = 250 microseconds / 1000 = 0.25 milliseconds.
The execution time = [ 1/2 microseconds ]/ 1000 = 0.0005 milliseconds.
The number of Pages sent in a second by the disc = 1000/10 milliseconds = 100.
Assuming U = 1.
Hence, the disc transfer time = [2/3 × 1 } + [ 1/3 × 0.25 milliseconds + 15 ] × 2.
=0.667 + 15.083.
= 15.75 millisecond.
Average number of instruction = 15.75/0.0005 = 31500.
It should be noted that the number of pages in a second will be 100 pages.
From the information given, it was stated that the instruction takes 1/2 microsecond to execute and a page fault takes 250 microseconds of processor time to handle plus 10 milliseconds of disk time to read the page.
Therefore, the execution time will be:
= 0.5/1000
= 0.0005
Therefore, the number of pages will be:
= 1000/10
= 100
Also, the disc transfer time will be;
= (2/3 × 1) + (1/3 × 0.25 + 15) × 2
= 0.667 + 15.083
= 15.75
Therefore, the average number of instructions will be:
= 15.75/0.0005
= 31500
Learn more about time taken on:
https://brainly.com/question/4931057
__________ type of storage is very popular to store music, video and computer programs.
i am doing my homework plzz fast
Answer:
Optical storage devices.
Explanation:
Optical storage device are those devices that read and store data using laser. To store data in optical storage devices low-power laser beams are used. It is a type of storage that stores data in an optical readability medium.
Examples of the optical storage device includes Compact disc (CD) and DVD.
The optical storage device is popular in storing data of music, videos, and computer program. Therefore, the optical storage device is the correct answer.
What is the full form of 'Rom
Answer:
Read-only memory
Explanation:
Read-only memory is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device.
By using your own data, search engines and other sites try to make your web experience more personalized. However, by doing this, certain information is being hidden from you. Which of the following terms is used to describe the virtual environment a person ends up in when sites choose to show them only certain, customized information?
A filter bubble
A clustered circle
A relational table
An indexed environment
Answer:
A filter bubble
Explanation:
2. Write a Python regular expression to replace all white space with # in given string “Python is very simple programming language.”
Dear Parent, Please note that for your convenience, the School Fee counter would remain open on Saturday,27th March 2021 from 8am to 2 pm. Kindly clear the outstanding amount on account of fee of your ward immediately either by paying online through parent portal or by depositing the cheque at the fee counter to avoid late fee charges.For payment of fee the following link can also be used Pay.balbharati.org
write essay about pokhara
Explanation:
Pokhara is the second most visited city in Nepal, as well as one of the most popular tourist destinations. It is famous for its tranquil atmosphere and the beautiful surrounding countryside. Pokhara lies on the shores of the Phewa Lake. From Pokhara you can see three out of the ten highest mountains in the world (Dhaulagiri, Annapurna, Manasalu). The Machhapuchre (“Fishtail”) has become the icon of the city, thanks to its pointed peak.
As the base for trekkers who make the popular Annapurna Circuit, Pokhara offers many sightseeing opportunities. Lakeside is the area of the town located on the shores of Phewa Lake, and it is full of shops and restaurants. On the south-end of town, visitors can catch a boat to the historic Barahi temple, which is located on an island in the Phewa Lake.
On a hill overlooking the southern end of Phewa Lake, you will find the World Peace Stupa. From here, you can see a spectacular view of the lake, of Pokhara and Annapurna Himalayas. Sarangkot is a hill on the southern side of the lake which offers a wonderful dawn panorama, with green valleys framed by the snow-capped Annapurnas. The Seti Gandaki River has created spectacular gorges in and around the city. At places it is only a few meters wide and runs so far below that it is not visible from the top
Pokhara is a beautiful city located in the western region of Nepal. It is the second largest city in Nepal and one of the most popular tourist destinations in the country. The city is situated at an altitude of 827 meters above sea level and is surrounded by stunning mountain ranges and beautiful lakes. Pokhara is known for its natural beauty, adventure activities, and cultural significance.
One of the most famous attractions in Pokhara is the Phewa Lake, which is the second largest lake in Nepal. It is a popular spot for boating, fishing, and swimming. The lake is surrounded by lush green hills and the Annapurna mountain range, which provides a stunning backdrop to the lake.
Another popular attraction in Pokhara is the World Peace Pagoda, which is a Buddhist stupa located on top of a hill. The stupa is a symbol of peace and was built by Japanese Buddhist monks. It provides a panoramic view of the city and the surrounding mountains.
The city is also known for its adventure activities, such as paragliding, zip-lining, and bungee jumping. These activities provide a unique and thrilling experience for tourists who are looking for an adrenaline rush.
In addition to its natural beauty and adventure activities, Pokhara is also significant for its cultural heritage. The city is home to many temples, such as the Bindhyabasini Temple, which is a Hindu temple dedicated to the goddess Bhagwati. The temple is located on a hill and provides a panoramic view of the city.
Overall, Pokhara is a city that has something to offer for everyone. It is a perfect destination for those who are looking for natural beauty, adventure activities, and cultural significance. The city is easily accessible by road and air, and is a must-visit destination for anyone who is planning to visit Nepal.
What techniques overcome resistance and improve the credibility of a product? Check all that apply.
Including performance tests, polls, or awards
Listing names of satisfied users
Sending unwanted merchandise
Using a celebrity name without authorization
Answer: Including performance tests, polls, or awards.
Listing names of satisfied users
Explanation:
For every business, it is important to build ones credibility as this is vital on keeping ones customers and clients. A credible organization is trusted and respected.
The techniques that can be used to overcome resistance and improve the credibility of a product include having performance tests, polls, or awards and also listing the names of satisfied users.
Sending unwanted merchandise and also using a celebrity name without authorization is bad for one's business as it will have a negative effect on the business credibility.
what is a case in programming
Answer:
A case in programming is some type of selection, that control mechanics used to execute programs :3
Explanation:
:3
discuss the term business information SYSTEMS
Answer:
Business information systems provide information that organizations use to manage themselves efficiently and effectively, typically using computer systems and technology. Primary components of business information systems include hardware, software, data, procedures (design, development, and documentation) and people.
Explanation:
Hope It Help you
importance of information
literay to the society
Explanation:
Information literacy is important for today's learners, it promotes problem solving approaches and thinking skills – asking questions and seeking answers, finding information, forming opinions, evaluateing sources, and making decisions fostering successful learners, effective contributors, and confident individuals.Explain 2 ways in which data can be protected in a home computer??
Answer:
The cloud provides a viable backup option. ...
Anti-malware protection is a must. ...
Make your old computers' hard drives unreadable. ...
Install operating system updates. ...
Which of the following is step two of the Five-Step Worksheet Creation Process?
Answer:
Add Labels.
As far as i remember.
Explanation:
Hope i helped, brainliest would be appreciated.
Have a great day!
~Aadi x
Add Labels is step two of the Five-Step Worksheet Creation Process. It helps in inserting the data and values in the worksheet.
What is label worksheet in Excel?A label in a spreadsheet application like Microsoft Excel is text that offers information in the rows or columns around it. 3. Any writing placed above a part of a chart that provides extra details about the value of the chart is referred to as a label.
Thus, it is Add Labels
For more details about label worksheet in Excel, click here:
https://brainly.com/question/14719484
#SPJ2
Define and use in your program the following functions to make your code more modular: convert_str_to_numeric_list - takes an input string, splits it into tokens, and returns the tokens stored in a list only if 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 None. get_min - if the input list is not empty and stores only numerical values, returns the minimum value in the list; otherwise, returns None. get_max - if the input list is not empty and stores only numerical values, returns the maximum value in the list; otherwise, returns None.
Answer:
In Python:
def convert_str_to_numeric_list(teststr):
nums = []
res = teststr.split()
for x in res:
if x.isdecimal():
nums.append(int(x))
else:
nums = []
break;
return nums
def get_avg(mylist):
if not len(mylist) == 0:
total = 0
for i in mylist:
total+=i
ave = total/len(mylist)
else:
ave = "None"
return ave
def get_min(mylist):
if not len(mylist) == 0:
minm = min(mylist)
else:
minm = "None"
return minm
def get_max(mylist):
if not len(mylist) == 0:
maxm = max(mylist)
else:
maxm = "None"
return maxm
mystr = input("Enter a string: ")
mylist = convert_str_to_numeric_list(mystr)
print("List: "+str(mylist))
print("Average: "+str(get_avg(mylist)))
print("Minimum: "+str(get_min(mylist)))
print("Maximum: "+str(get_max(mylist)))
Explanation:
See attachment for complete program where I use comment for line by line explanation
Consider the following static method, calculate.
public static int calculate(int x)
{
x = x + x;
x = x + x;
x = x + x;
return x;
}
Which of the following can be used to replace the body of calculate so that the modified version of calculate will return the same result as the original version for all values of x?
return 8 * x;
return 3 + x;
return 3 * x;
return 6 * x;
return 4 * x;
Answer:
return 8 * x;
Explanation:
Required
What can replace the three lines of x = x + x
We have, on the first line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
On the second line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
Recall that, the result of line 1 is: [tex]x=>2x[/tex]
So, we have:
[tex]x=>2 * 2x[/tex]
[tex]x=>4x[/tex] --- at the end of [tex]line\ 2[/tex]
On the third line:
[tex]x=>x +x[/tex]
[tex]x=>2x[/tex]
Recall that, the result of line 2 is: [tex]x=>4x[/tex]
So, we have:
[tex]x = 2 * 4x[/tex]
[tex]x => 8x[/tex]
So: 8 * x can be used
What may make it easy for cybercriminals to commit cybercrimes? Select 2 options.
Cybercrimes are not classified as real crimes, only as virtual crimes.
They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
The United States has no law enforcement that acts against them.
Law enforcement agencies lack the expertise to investigate them.
Answer: They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
Explanation:
edg
Answer:
They operate from countries that do not have strict laws against cybercrime.
They are not physically present when the crime is committed.
Explanation: