loobovuxuvoyuvoboh
Explanation:
onovyctvkhehehe
Answer:
jfhwvsudlanwisox
Explanation:
ummmmmm?
Write a test program that prompts the user to enter three sides of the triangle (make sure they define an actual triangle), a color, and a Boolean value to indicate whether the triangle is filled.
Answer:
Scanner in = new Scanner(System.in);
System.out.print("Please enter 3 sides of a triangle, color and " +
"whether it is filled or not (true false): ");
double s1 = in.nextDouble();
double s2 = in.nextDouble();
double s3 = in.nextDouble();
String color = in.next();
boolean filled = in.nextBoolean();
Triangle t1 = null;
try {
t1 = new Triangle(s1, s2, s3, color, filled);
}
catch (IllegalTriangleException ite) {
System.out.println(ite.toString());
}
System.out.println(t1.toString());
System.out.printf("Triangle color: %s, Triangle filled: %s%n" +
"Area: %.2f%n" +
"Perimeter: %.2f%n%n",
t1.getColor(),
t1.isFilled(),
t1.getArea(),
t1.getPerimeter());
Explanation:
Scanner in = new Scanner(System.in);
System.out.print("Please enter 3 sides of a triangle, color and " +
"whether it is filled or not (true false): ");
double s1 = in.nextDouble();
double s2 = in.nextDouble();
double s3 = in.nextDouble();
String color = in.next();
boolean filled = in.nextBoolean();
Triangle t1 = null;
try {
t1 = new Triangle(s1, s2, s3, color, filled);
}
catch (IllegalTriangleException ite) {
System.out.println(ite.toString());
}
System.out.println(t1.toString());
System.out.printf("Triangle color: %s, Triangle filled: %s%n" +
"Area: %.2f%n" +
"Perimeter: %.2f%n%n",
t1.getColor(),
t1.isFilled(),
t1.getArea(),
t1.getPerimeter());
Any action that causes harm to your computer is called a
1.Security harm
2.Security damage
3.Security risk
4.Security crime
Answer:
Security risk.
Explanation:
It is making your computer vulnerable to attacks and less secure.
Any action that causes harm to your computer is called a security risk. That is option 3.
What is security risk in computer?A computer is an electronic device that can be used to prepare, process and store data.
Security risk in computer is any action undertaken by a computer user that can lead to the loss of data or damage to hardware or software of the computer.
Some of the security risks that predisposes a computer to damage include the following:
unpatched software, misconfigured software or hardware, andbad habits such as keeping fluid close to the computer.Therefore, any action that causes harm to your computer is called a security risk.
Learn more about security risks here:
https://brainly.com/question/25720881
4. Interaction between seller and buyer is called___.
A. Demanding
B. Marketing
C. Transactions
D. Oppurtunity
Answer:
C. Transactions.
Explanation:
A transaction can be defined as a business process which typically involves the interchange of goods, financial assets, services and money between a seller and a buyer.
This ultimately implies that, any interaction between a seller and a buyer is called transactions.
For example, when a buyer (consumer) pays $5000 to purchase a brand new automobile from XYZ automobile and retail stores, this is referred to as a transaction.
Hence, a transaction is considered to have happened when it's measurable in terms of an amount of money (price) set by the seller.
Price can be defined as the amount of money that is required to be paid by a buyer (customer) to a seller (producer) in order to acquire goods and services. Thus, it refers to the amount of money a customer or consumer buying goods and services are willing to pay for the goods and services being offered. Also, the price of goods and services are primarily being set by the seller or service provider.
For each compound below, identify any polar covalent bonds and indicate the direction of the dipole moment using the symbols δ +and δ-.
(a) HBr
(b) HCI
(c) H2O
(d) CH40
Answer:
H-Br bond is polar, hydrogen is partly positive and bromine is partly negative
H-Cl bond is polar, hydrogen is partly positive and bromine is partly negative
O-H bond in water is polar, hydrogen is partly positive and oxygen is partly negative
C-O bond in CH40 is polar, carbon is partly positive and oxygen is partly negative
Explanation:
A molecule possess a dipole moment when there is a large difference in electro negativity between two bonding atoms in the molecule.
The presence of dipole moments introduces polarity to the molecule. In all the molecules listed in the answer, the shared electron pair of the bond is closer to the more electronegative atom causing it to be partially negative while the less electronegative atom in the bond is partially positive.
In cell B13, create a formula without a function using absolute references that subtracts the values of cells B5 and
B7 from cell B6 and then multiples the result by cell B8. please help with excel!! I'm so lost
Answer:
The formula in Excel is:
=($B$6 - $B$5 - $B$7)* $B$8
Explanation:
Required
Use of absolute reference
To reference a cell using absolute reference, we have to include that $ sign. i.e. cell B5 will be written as: $B$5; B6 as $B$6; B7 as $B$7; and B8 as $B$8;
Having explained that, the formula in cell B13 is:
=($B$6 - $B$5 - $B$7)* $B$8
A pointer can be used as a function argument, giving the function access to the original argument.
A. True
B. False
Answer:
True
Explanation:
A pointer can be used as a function argument, giving the function access to the original argument.
A primary key ensures that —- are unique ?
Answer:
To qualify as a primary key, it is the data within each column that must be unique, not simply the column names themselves. At the same time, no value in the columns can be blank or NULL. A primary key, therefore, is used to ensure the data in a specific column is unique.
Explanation:
hope it's help
please help me I mark you brilliant thanks
Answer:
B attaches to C, and C goes into A. (Sequence: A, then insert C into A, then insert B into C.)
Explanation:
You can quite literally get the answer from treating it like a puzzle. There is only 1 solution you can have, and they are marked with shapes. This is also the correct solution to clear the text box with button2 on click.
Consider the following class, which uses the instance variable balance to represent a bank account balance.
public class BankAccount {
private double balance;
public double deposit(double amount) {
/* missing code */
}
}
The deposit method is intended to increase the account balance by the deposit amount and then return the updated balance. Which of the following code segments should replace /* missing code */ so that the deposit method will work as intended?
a.
amount = balance + amount;
return amount;
b.
balance = amount;
return amount;
c.
balance = amount;
return balance;
d.
balance = amount;, , return balance;,
balance = balance + amount;
return amount;
e.
balance = balance + amount;
return balance;
Answer:
e.
balance = balance + amount;
return balance;
Explanation:
Required
Code to update account balance and return the updated balance
The code that does this task is (e).
Assume the following:
[tex]balance = 5000; amount = 2000;[/tex]
So, code (e) is as follows:
balance = balance + amount; [tex]\to[/tex]
[tex]balance = 5000 + 2000[/tex] [tex]\to[/tex]
[tex]balance = 7000[/tex]
Here, the updated value of balance is 7000
So: return balance
will return 7000 as the updated account balance
Other options are incorrect
Can you write a global keyword in a program with capital letters instead
small in php
Answer:
Variable names in PHP are case sensitive (including the global variables!), although function names are not.
Which of the following ribbon tools would be most efficient for applying multiple
changes to text formatting?
a. Font Dialog Box
b. Paragraph Styles
c. Styles Dialog Box
d. Find and Replace
Answer:
Option A, Font Dialog Box
Explanation:
In order to make changes in the text formatting, the font setting in the dialog box can be used on the Ribbon's Home tab.
From the font settings in Word 2016, one can change the following change font color, size, style etc.
Hence, option A is correct
The elements in a long array of integers are roughly sorted in decreasing order. No more than 5 percent of the elements are out of order. Which of the following is the best method to use to sort the array in descending order?
I. Insertion sort.
Il. Merge Sort.
III. Heap Sort.
a. Ill only.
b. I only.
c. II and III only.
d. I and II only.
e. Il only I and.
f. Ill only.
Question Completion with Options:
a. Ill only.
b. I only.
c. II and III only.
d. I and II only.
e. Il only
f. I and Ill only.
Answer:
The best method to use to sort the array in descending order is:
e. Il only
Explanation:
The Merge Sort is similar to the Insertion Sort but, it is better with its sorting versatility. It repeatedly breaks down a list into several sub-lists until each sub-list consists of a single element and then, merging the sub-lists in a manner that results in a sorted list. The Merge Sort has been described as a "divide and conquer" technique because of how it splits a list into equal halves before combining them into a sorted whole.
ProgrammingAssignment3
Project Goals
Please Code using C
The goal of this project is to:
Familiarize students with functions
Provide students with continued practice with expressions and selection.
Important Notes:
Formatting: Make sure that you follow the precise recommendations for the output content and formatting. For your testing purposes, the autograder will be comparing your output to that of the example executable.
Comments: Header comments are required on all files and recommended for the rest of the program. Points will be deducted if no header comments are included.
Filename: Save your program as hotels.c
Program
Hope you enjoyed your stay!
We're going to create a reservation making system to incorporate discounts for longer stays.
We’ll be getting the customer’s number of nights and we’ll also be getting the type of the room, which should be one of the following letters: D, Q, or K (for Double, Queen, or King). We’ll do that for two reservations.
To be able to advise the user on which reservation they should choose, we're going to have to make some calculations. First we'll need to determine the price per night. Double rooms go for $59.99 per night, Queen rooms are $69.99 per night, and King rooms are $79.99 per night.
Then we'll need to determine the discount. For every night over 2, a 15% discount should be applied. For example, if the stay is for 4 nights, then a 30% discount would be applied to the overall price.
Finally, we need to let the user know which stay is the cheapest or if they're the same cost.
Input:
The user should be prompted for a set of two values which represent the number of nights and the room type for the first reservation. The number of nights should be a whole number. The room type should be a single letter. The user should enter both values on one line, separated by spaces. The user should then be prompted for the remaining reservation.
Example (the highlighted part is what the program displays and the italicized part is the user input): Reservation 1 (#nights type): 3 D
The example executable:
An example executable is provided in this repository. You should be able to run it from your project folder. If you encounter a “permission denied” error when attempting to run the executable, type chmod u+x hotelsExecutable into the terminal and try running the executable again.
Requirements
main()
Functionality: The main function should prompt the user for two reservations. The room rate for each room for each reservation must be determined. Then the reservation total for each reservation can be calculated. A message should be displayed advising the user on which reservation is the better deal.
In addition to the main functions, your program should have 2 more functions:
getRoomRate()
Input Parameters: room type
Returned Output: room rate
Functionality: Given the type of room, this function should return the appropriate room rate.
calcReservation()
Input Parameters: room rate, number of nights
Returned Output: total reservation price
Functionality: Given the room rate and number of nights, this function should return the total reservation price with any applicable discount applied.
Answer:
Las actividades de planificación, seguimiento, evaluación y elaboración de
informes mencionadas se analizarán de manera más pormenorizada en las
próximas secciones. Sin embargo, el siguiente resumen brinda una síntesis de
estas actividades y en el anexo 2 figuran recursos adicionales para cada etapa.
1. Evaluación inicial de las necesidades: evaluación que tiene por objeto determi‑
nar la necesidad de llevar a cabo un proyecto o programa y, en caso afirmati‑
vo, brindar información a los responsables de la planificación.
2. Matriz de planificación e indicadores: componentes que abarcan el plan de
operaciones del proyecto o programa y sus objetivos, indicadores, medios de
verificación e hipótesis.
3. Planificación del seguimiento y la evaluación: el proceso mediante el cual se
planifica en forma práctica cómo se seguirán y evaluarán los objetivos y los
indicadores del marco lógico del proyecto o programa.
4. Estudio de referencia: estudio en virtud del cual se miden las condiciones ini‑
ciales, mediante los indicadores adecuados, antes del inicio de un proyecto o
programa.
5. Revisión o evaluación de mitad de período: principales actividades de reflexión
destinadas a evaluar la ejecución del proyecto o programa en curso y brindar
información a los responsables.
6. Evaluación definitiva: evaluación que se lleva a cabo una vez concluido el pro‑
yecto o programa con el objeto de determinar en qué medida se lograron los
objetivos previstos y qué cambios se produjeron.
7. Difusión y utilización de las enseñanzas extraídas: el proceso mediante el cual
se transmite información a los responsables de los proyectos y programas
en curso. No obstante, los procesos de elaboración de informes, reflexión y
extracción de enseñanzas deben llevarse a cabo durante la totalidad del ciclo
Explanation:
You're expecting visitors who will be demanding Mamet access Before they arrive, you can activate a Guest network that has its own ________ and a different password from the one used with the network where you store all your files.
functions
is the correct answer of your question ^_^
Which answer below is NOT a function of a Data Scientist? O Data Exploitation O Data Strategies O Data Modeling O Data Preperation
Answer:
uh
Explanation:
yesyesyesyesyesyeysyeys
I get an error message on my code below. How can I fix it?
import java.util.Scanner;
public class CelsiusToFahrenheit {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
double tempF;
double tempC;
System.out.println("Enter temperature in Celsius: ");
tempC = scnr.nextDouble();
System.out.print("Fahrenheit: ");
System.out.println(tempF);
return;
}
}
CelsiusToFahrenheit.java:16: error: variable tempF might not have been initialized
System.out.println(tempF);
^
1 error
Answer:
tempF = (tempC * 1.8) + 32;
Explanation:
Required
Correct the error in the program
The error is due to tempF not been initialized or being calculated
Correct the error by writing the formula for tempF before tempF was printed
tempF = (tempC * 1.8) + 32;
Writing the formula ensures that tempF is initialized with the expected equivalent value for tempC
management is as old as human civilization. justify this statement
Answer:
Indeed, management is as old as the human species, as human nature is itself dependent on the natural resources that it needs for its subsistence, therefore needing to exercise a correct administration of said resources in such a way as to guarantee that those resources can satisfy the greatest number of individuals. That is, the human, through the correct management of resources, seeks to avoid the scarcity of them.
Write a program that will allow a grocery store to keep track of the total number of bottles collected for a seven-day period. The program should allow the user to enter the number of bottles returned for each day of the seven-day period. The program will accumulate the total number of bottles returned for the 7-day period. Then calculate the amount paid out (the total bottles returned times .10 cents). The output (display) of the program should include the total number of bottles returned and the total paid out. Allow the user to enter multiple transactions
Answer:
Print the values days of bottles.Display total number of bottles collecting.Display the payout for this transaction.Explanation:
Program:-
DEPOSIT_PER_BOTTLE = 0.10
another = "Y"
while another=="Y":
print("Input Values 7 days of bottles:")
total = 0
for I in range(7):
collected_bottles = int(input())
total += collected_bottles
payout = total*DEPOSIT_PER_BOTTLE
print("Total number of bottles collected: {:,}".format(total))
print("Payout for this transaction $%.2f"%payout)
another = input("Do you want to complete another transaction? ").upper()
Smartphones are more likely to be used than laptop computers for everyday ICT use.
Describe three advantages of using a smartphone rather than a laptop computer.
Answer:
it's small amd you can carry it everywhere
easy to use
long lasting battery
Explanation:
hope the answers are right:)
HEALTH AND SAFETY IN USING ICT TOOLS
Answer:
Health and Safety using ICT Tools.
...
Some of the long-term health effects are:
Headaches and tiredness. Using the mobile phone for hours can be very stressful and may lead to mild or severe headaches.
Creates joint pain. ...
Mobile phone battery explosion. ...
Induced ringing!
Answer:
ICT tools for health and safety. Find common health issues related to computer usage and other ICT tools.
Explanation:
Use of ICT instruments
ICT tools are computer-based equipment used for processing and communicating information and technology. There are certain ICT tools;
- TV.
- System of Public Address
- Radio
- Mobile Phone
- Computer
What are the adverse consequences of long-term television exposure?
You don't have eyes for hours to stare at the TV.
Taking hours on the TV can be dangerous and dangerous for the eye.
If you starve continuously, your eye will get overworked and this will cause an irritation of the eye, such as dry eye, red, itchy, and watery eyes, fatigue, eyelid weight or forehead, as well as eye concentration.
Certain long-term effects on health are:
1. Tiredness and headaches.
2. Make pain joint.
3. Battery explosion mobile phone.
4. Ringing induced! In ears.
5.19 LAB: Output values in a list below a user defined amount
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value.
Ex: If the input is:
5
50
60
140
200
75
100
the output is:
50,60,75,
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.
For coding simplicity, follow every output value by a comma, including the last one.
Such functionality is common on sites like Amazon, where a user can filter results.
Answer:
The program in Python is as follows:
n = int(input())
myList = []
for i in range(n):
num = int(input())
myList.append(num)
threshold = int(input())
for i in myList:
if i<= threshold:
print(i,end=", ")
Explanation:
This gets the number of inputs
n = int(input())
This creates an empty list
myList = []
This iterates through the number of inputs
for i in range(n):
For each iteration, this gets the input
num = int(input())
And appends the input to the list
myList.append(num)
This gets the threshold after the loop ends
threshold = int(input())
This iterates through the list
for i in myList:
Compare every element of the list to the threshold
if i<= threshold:
Print smaller or equal elements
print(i,end=", ")
The Python program below gets a list of integers, then filters that list based on a threshold value:
########################################################
# initialize the integer and output lists
integer_list = [ ]
output_list = [ ]
# first enter the number of integers that will follow
# and append it to integer list
qty = int(input("Enter the number of integers to follow: "))
integer_list.append(qty)
# next enter the number of integers and append them to integer list
for i in range(0, qty):
num = int(input("Enter an integer: "))
integer_list.append(num)
# finally enter the threshold value to be used to filter the integers
threshold = int(input("Enter the threshold value: "))
integer_list.append(threshold)
# filter the integers
for num in integer_list:
if num <= integer_list[-1]:
output_list.append(num)
# display the result
print("The values from { } that are less than or equal to { } are
{ }".format(integer_list[1:-1], integer_list[-1], output_list))
########################################################
The program first asks the user to enter the following:
The number of integers to be checkedThe integers themselvesThe threshold value to be used for filteringThe program next iterates over the integer list and filters the integers from index 1 to index -1(exclusive, since this is the threshold value) based on the element at index -1(the last element, the threshold value).
Each element that satisfies the filtering criterion (e <= threshold) is added to the output list and printed out later.
Another example of a Python program is found here: https://brainly.com/question/24941798
Write a method, findMax(), that takes in two integers and returns the largest value. Ex: If the program input is: 4 2 the method findMax() returns: 4 Note: Your program must define the method: public int findMax(int num1, int num2)
public int findMax(int num1, int num2){
if(num1 > num2){
return num1;
}
else {
return num2;
}
}
Explanation:The code has been written in Java and the following explains every part of the code.
i. Start with the method header:
public int findMax(int num1, int num2)
ii. Followed by a pair of curly braces representing the block for the method.
public int findMax(int num1, int num2){
}
iii. Within the block, write the statements to find out which is greater between num1 and num2
This is done with an if..else statement. To check if num1 is greater than num2, write the following within the block.
if(num1 > num2){
return num1;
}
else {
return num2;
}
The if block tests if num1 is greater than num2. If it is, then num1 will be returned.
The else block is executed only if num1 is not greater than num2. In this case, num2 will be returned since it is greater.
iv. Put all together
public int findMax(int num1, int num2){
if(num1 > num2){
return num1;
}
else {
return num2;
}
}
system. Construct an ER diagram for keeping records for exam section of a college.
When an item is gray that means...
A. The item only works with another application
B. The item has been selected
C. The item is unavailable
D. The item has been deleted
A,B,C,orD, can anyone please help?
Answer:
B. The item has been selected
Answer:
C
Explanation:
When an item is unavailable, usually referring to the Technology field, it is gray. Gray items are things that are not created anymore, sold out or not enough supply. The color gray is usually used to symbol something bad, and not having a product is considered bad. Using our background knowledge, we can concude that the answer is option C.
In cell B13, create a formula without a function using absolute references that subtracts the values of cells B5 and
B7 from cell B6 and then multiples the result by cell B8. please help with excel!! I'm so lost
Answer:
The formula in Excel is:
=($B$6 - $B$5 - $B$7)* $B$8
Explanation:
Required
Use of absolute reference
To reference a cell using absolute reference, we have to include that $ sign. i.e. cell B5 will be written as: $B$5; B6 as $B$6; B7 as $B$7; and B8 as $B$8;
Having explained that, the formula in cell B13 is:
=($B$6 - $B$5 - $B$7)* $B$8
Assume that a, b, and c have been declared and initialized with int values. The expression
!(a > b || b <= c)
is equivalent to which of the following?
a. a > b && b <= c
b. a <= b || b > c
c. a <= b && b > c
d. a < b || b >= c
e. a < b && b >= c
Answer:
Option c (a <= b && b > c) and Option e (a < b && b >= c) is the correct answer.
Explanation:
According to the question, the given expression is:
⇒ !(a > b || b <= c)
There will be some changes occur between the values such as:
! = It becomes normal> = It becomes <|| = It becomes &&So that the expression will be:
⇒ a <= b && b > c
and
⇒ a < b && b >= c
Other choices are not connected to the expression or the rules. So the above two alternatives are the correct ones.
what is ms- power point?
Answer:
Microsoft PowerPoint is a powerful slide show presentation program. It is a standard component of the company's Microsoft Office suite software, and is bundled together with Word, Excel, and other office productivity tools. The program uses slides to convey information rich in multimedia.
hope it work️
Answer:
Microsoft PowerPoint is a presentation software which is used to make slideshow.
Explanation:
hope you like it
Overview In this assignment, you will gain more practice with designing a program. Specifically, you will create pseudocode for a higher/lower game. This will give you practice designing a more complex program and allow you to see more of the benefits that designing before coding can offer. The higher/lower game will combine different programming constructs that you have been learning about, such as input and output, decision branching, and a loop. IT 140 Higher/Lower Game Sample Output Overview Maria has asked you to create a program that prompts the user to enter the lower bound and the upper hound. You have decided to write pseudocode to design the program before actually developing the code. When run, the program should ask the user to guess a number. If the number guessed is lower than the random number, the program should print out a message like "Nope, too low." if the number guessed is higher than the random number, print out a message like "Nope, too high." If the number guessed is the same as the random number, print out a message like "You got it!" Higher/Lower Game Description Your friend Maria has come to you and said that she has been playing the higher/lower game with her three-year-old daughter Bella. Maria tells Bella that she is thinking of a number between 1 and 10, and then Bella tries to guess the number. When Bella guesses a number, Maria tells her whether the number she is thinking of is higher or lower or if Bella guessed it. The game continues until Bella guesses the right number. As much as Maria likes playing the game with Bella, Bella is very excited to play the game all the time, Maria thought it would be great if you could create a program that allows Bella to play the game as much as she wants. Note: The output messages you include in your pseudocode may differ slightly from these samples. Sample Output Below is one sample output of the program, with the user input demonstrated by bold font. Prompt For this assignment, you will be designing pseudocode for a higher/lower game program. The higher/lower game program uses similar constructs to the game you will design and develop in Projects One and TWO. Welcome to the higher/lower game, Bella! Enter the lower bound: 10 Enter the upper bound: 30 Great, now guess a number between 10 and 30: 20 Nope, too low Guess another number: 25 Nope, too high Guess another number: 23 You got it! Below is another sample output of your program, with the user input demonstrated by bold font 1. Review the Higher/Lower Game Sample Output for more detailed examples of this game. As you read, consider the following questions: What are the different steps needed in this program? How can you break them down in a way that a computer can understand? What information would you need from the user at each point (inputs)? What information would you output to the user at each point? When might it be a good idea to use 'F' and "IF ELSE' statements? When might it be a good idea to use loop? 2. Create pseudocode that logically outlines each step of the game program so that it meets the following functionality: Prompts the user to input the lower bound and upper bound. Include input validation to ensure that the lower bound is less than the upper bound. - Generates a random number between the lower and upper bounds Prompts the user to input a guess between the lower and upper bounds. Include input validation to ensure that the user only enters values between the lower and upper bound. Prints an output statement based on the puessed number. Be sure to account for each of the following situations through the use of decision branching . What should the computer output if the user guesses a number that is too low? . What should the computer output if the user guesses a number that is too high? - What should the computer output if the user guesses the right number? Loops so that the game continues prompting the user for a new number until the user guesses the correct number. Welcome to the higher/lower game, Bella! Enter the lower bound: 10 Enter the upper bound: 5 The lower bound must be less than the upper bound. Enter the lower bound: 10 Enter the upper bound: 20 Great, now guess a number between 10 and 20: 25 Nope, too high Guess another number: 15 Nope, too low. Guess another number: 17 You got it! Sutrnil your completed pseudocode as a Word document of approximately 1 to 2 pages in length.
Answer:
Pseudocode
lower = upper = 0
while lower > upper
input lower
input upper
if lower > upper
print "Lower bound is greater than upper bound"
randNum = generate_a_random_number
print "Guess a number between",lower,"and",upper
input num
while num <> randNum
if num > randNum:
print "Nope, too high"
else:
print "Nope, too low"
input num
print "Great; you got it!"
Program in Python
import random
lower = upper = 0
while True:
lower = int(input("Lower Bound: "))
upper = int(input("Upper Bound: "))
if lower < upper:
break
else:
print("Lower bound is greater than upper bound")
randNum = random.randint(lower, upper)
print("Great; now guess a number between",lower,"and",upper)
num = int(input("Take a guess: "))
while num != randNum:
if num > randNum:
print("Nope, too high")
else:
print("Nope, too low")
num = int(input("Take another guess: "))
print("Great; you got it!")
Explanation:
Required
Write a pseudocode and a program to design a higher/lower game
See answer section for the pseudocode and the program (written in Python)
The pseudocode and the program follow the same pattern; so, I will only explain the program.
See attachment for complete program file where comments are used to explain each line.
A group of computer scientists wants to create a fixed-length compression algorithm. The simplest way to achieve compression is to use a fixed-length code generator. The idea behind this type of code generator is to assign a fixed-length bit sequence to each symbol of the alphabet. As part of this group of computer scientists, your goal is to write a program to determine the alphabet used by the message to be compressed (set of different characters in the input message), and the frequency of each symbol in the alphabet, using conditionals, loops, and arrays.
Answer:
Here the code is given as follows,
Explanation:
OUTPUT:
Message: AAAABBBCCDDDDDDDE
Number of symbols in the alphabet = 5
Characters in the alphabet = A,B,C,D,E
Number of bits per symbol = 3
Histogram showing the frequency of the symbols in the alphabet
A | ****
B | ***
C | **
D | *******
E | *
for macroscale distillations, or for microscale distillations using glassware with elastomeric connectors, compare the plot from your simple distillation with that from your fractional distillation. in which case do the changes in temperature occur more gradually
Answer:
Fractional Distillation
Explanation:
Fractional Distillation is more effective as compared to simple distillation. In simple distillation, the temperature changes more gradually as compared to the fractional distillation