Answer:
see explaination
Explanation:
please kindly see attachment for the step by step solution of the given problem.
Answer:
C.system prototyping
Explanation:
Prototyping produces a quickly constructed working version of the proposed information system.
Planning
↓
Analysis
↓
Design
↓
System prototyping
↓
Implementation
Answer:
c. system prototyping
Explanation:
system prototyping produces a full-featured, working model of the information system.
Answer:
Since Python is a scripting language, here is code in python.
#prompt user to give check
amount=float(input("Please Enter the check:"))
#prompt user to give service
service=input("Please Enter the service (good, fair or poor):")
# calculate tip on the basis of service
if service =="good":
tip=amount*0.2
elif service=="fair":
tip=amount*0.15
elif service=="poor":
tip=amount*0.05
#calculate total
total=amount+tip
#print tip
print("tip is equal to : {} ".format(tip))
#print total
print("total of the check is : {} ".format(total))
Explanation:
Prompt user to give check and service input.After taking the input from user, based on the service tip will be calculated. if service is "good" then tip will be 20% of the check, tip will be 15% if service is "fair" and tip will be 5% if service is "poor".
Output:
Please Enter the check:125
Please Enter the service (good, fair or poor):good
tip is equal to : 25.0
total of the check is : 150.0
of the numbers 2 through 10.
Answer:
//Program in C++.
// header
#include <bits/stdc++.h>
using namespace std;
// function to multiply number with 2-10
void multiplicationTable(int num)
{
cout<<"Number when multiplied with 2-10:"<<endl;
for(int a=2;a<=10;a++)
{
// multiply number with 2-10
cout << num << " * " << a << " = " << num*a << endl;
}
}
// driver function
int main()
{
// variable
int num;
cout<<"Enter a number:";
// read number from user
cin>>num;
// call the function
multiplicationTable(num);
return 0;
}
Explanation:
Read a number from user and assign it to variable "num".Call the function multiplicationTable() with parameter "num".In this function, multiply number with each from 2 to 10 and print the value.
Output:
Enter a number:5
Number when multiplied with 2-10:
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50
b) onto but not one-to-one
c) neither one-to-one nor onto
Answer:
Let f be a function
a) f(n) = n²
b) f(n) = n/2
c) f(n) = 0
Explanation:
a) f(n) = n²
This function is one-to-one function because the square of two different or distinct natural numbers cannot be equal.
Let a and b are two elements both belong to N i.e. a ∈ N and b ∈ N. Then:
f(a) = f(b) ⇒ a² = b² ⇒ a = b
The function f(n)= n² is not an onto function because not every natural number is a square of a natural number. This means that there is no other natural number that can be squared to result in that natural number. For example 2 is a natural numbers but not a perfect square and also 24 is a natural number but not a perfect square.
b) f(n) = n/2
The above function example is an onto function because every natural number, lets say n is a natural number that belongs to N, is the image of 2n. For example:
f(2n) = [2n/2] = n
The above function is not one-to-one function because there are certain different natural numbers that have the same value or image. For example:
When the value of n=1, then
n/2 = [1/2] = [0.5] = 1
When the value of n=2 then
n/2 = [2/2] = [1] = 1
c) f(n) = 0
The above function is neither one-to-one nor onto. In order to depict that a function is not one-to-one there should be two elements in N having same image and the above example is not one to one because every integer has the same image. The above function example is also not an onto function because every positive integer is not an image of any natural number.
Answer:
View Images.
Image1 = the code
Image2 = testcase 1
Image3 = testcase 2
Image4 = testcase 3
Answer:
See the program code at explaination
Explanation:
CREATE PROCEDURE sp_Q1
atcountry1 NVARCHAR(15),
atcountry2 NVARCHAR(15)
AS
BEGIN
BEGIN
SELECT SupplierID, CompanyName, Phone, Country FROM suppliers
where Country in (atcountry1,atcountry2)
SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products
where SupplierID in(
SELECT SupplierID FROM suppliers
where Country in (atcountry1,atcountry2)) ORDER BY SupplierID
END
END
GO
-- Testing script.
DECLARE atRC int
DECLARE atcountry1 nvarchar(15)
DECLARE atcountry2 nvarchar(15)
-- Set parameter values here.
set atcountry1='UK'
set atcountry2='Canada'
EXECUTE atRC = [dbo].[sp_Q1]
atcountry1
,atcountry2
GO
Note: please kindly replace all the "at" with the correct at symbol.
The editor doesn't support it on Brainly.