Answer:
The answer to this question is given below in the explanation section
Explanation:
shoNum + shoNum2 = shoTotal
in this code statement, the order of operation is wrong because the calculation in programming always done at the right side of dependent variables. so the correct statement of code is
shoTotal = shoNum + shoNum2;
shoNum = 10 * 4
This statement is programmatically correct, because the ShoNum value becomes 40 after performing the multiplication operation on its assigned value (10 multiply by 4). However, it is noted that the empty space mostly ignored by the compiler. So, the correct is shoNum = 10*4;
Dim decPrice As Decimal = "$4.99"
The dollar sign is appeared in along with its value. So, if you assign value to a decimal variable, you need to assign only digit value (do not mix value with symbol or text) and also do not put quotation marks around value, if you put quotation marks around value then this value will be consider as a text value.
So, the correct statement is :
Dim decPrice As Decimal = 4.99;
shoCube= (shoSide)3
In this statement, cube is calculated of shoSide variable, mathematically it is right, but programmatically it is incorrect. Because, you missed the multiplication operation (*) between the operand shoSide and 3. it should
be as shoSide raise to power 3.
the correct statement is : shoCube = (shoSide * shoSide *shoSide);
Look at the following Python code:
word1 = "Umpire"
word2 = word1[0:3]
Which characters will be sliced from word1 and assigned to word2?
Ump
Umpi
mpi
pire
Ump will be assigned to word2
word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)
1.5 code practice question 3
Answer: What the hell is that 243 suppose to be
Explanation:uhg
#include
#include
using namespace std;
const string face[] = { "Ace", "2", "3", "4", "5", "6", "7",
"8", "9", "10", "Jack", "Queen", "King" };
const string suit[] = { "Clubs", "Diamonds", "Hearts", "Spades" };
string random_card(bool verbose=false) {
string card;
card = face[ rand()%13 ];
card += " of ";
card += suit[ rand()%4 ];
if (verbose)
cout << card << "\n";
return card;
}
int main(int argc, char *argv[])
{
bool verbose = false;
int seedvalue = 0;
for (int i=1; i
string option = argv[i];
if (option.compare(0,6,"-seed=") == 0) {
seedvalue = atoi(&argv[i][6]);
} else if (option.compare("-verbose") == 0) {
verbose = true;
} else
cout << "option " << argv[i] << " ignored\n";
}
srand(seedvalue);
// declare a table called deck that keeps track of
// card faces dealt for each suit -- initialize to 0
while (1) {string card = random_card(verbose);
// reverse engineer card suit and face
// break out of loop if stopping criteria met
}
// print formatted table contents to stdout
}
write the non-existent Prog2b.cpp code and have it keep track of the order in which a card rank is observed for each suit. You do this by inserting the cards at the back of linked lists, using one list for each suit. The exception applies: each time a rank is seen again, the card gets moved to the front of the list. When the stopping criterion from Prog2a is encountered, break the infinite-loop and print the contents of each linked list to stdout as shown below.
Add an array of linked lists: the length of the array is fixed at 4 like before, while the length of each linked list varies from suit to suit. Each new card is added to the appropriate list thru use of an insert() function. Declare a list class based on a single linked list. The list class needs to define a private node datatype, and it must include a constructor for properly initializing an empty list, a destructor for deallocating all the nodes in a list as well as the list itself, and the mentioned insert function which works as described next; no other list class functions are needed. Overload operator<<() used by ostream and have it print the contents of the list. Since access is needed to private data members, make the overloaded output operator a friend of the list class. See the code handouts for how to set this up.
The list::insert() function is where the fun work takes place. The function takes a single integer argument, namely, the rank index of a card where index refers to the position of the rank in the global rank string array. If the rank index is not held by any node in the linked list, a new node is created and added to the end of the list that stores the rank index value. However, if a node is found to already hold the present rank index argument, that node is moved to the front the linked list. That is, the node in question is unlinked from where it is and inserted after the head node.
Hint: You are using a single linked list which means you cannot go back once you have a match on the rank index. One option is to look ahead instead of advancing and then taking a look a the rank index. Another option is to maintain two pointers, namely, one pointing to previous node and one pointing to current node.
Hint: Write generic code that works under all circumstances rather than have several codes for special cases. For example, write the insert() function so that it can handle a rank match regardless of where the matching node resides in the list. Draw a sketch of the different scenarios that need to be handled and infer from it how to do it generically.
Prog2b example output
UNIX> ./prog2b
Clubs : 10 6 Queen King 9 Jack **
Diamonds : Jack 9 6 Ace 3 8
Hearts : 9 3 King 7 Jack
Spades : Queen Ace Jack
UNIX>
UNIX> ./prog2b -seed=140
Clubs : 10 Jack King 4 2 Ace 7 6 3 8
Diamonds : King 3 Ace 9 Queen 5 10 8 7 2 Jack **
Hearts : Jack 2 10 7 6 3 Ace 5 4
Spades : 6 5 Jack 4 9 Queen 2
Answer:
dang sis did u really have to but all of that
Write a program that calculates the occupancy rate for ahotel. The program should start by asking the user how many floorsthe hotel has. A loop should then iterate once for each floor. Ineach iteration, , the loop should ask the user for the number ofrooms on the floor and how many of them are occupied. After all theiterations, the program should display how many rooms the hotelhas, how many of them are occupied, how many are unoccupied, andthe percentage of rooms that are occupied. The percentage may becalculated by dividing the number of rooms occupied by the numberof rooms.
Requirements:
Do not accept a value less than one for the number offloors
Do not accept a value less than 10 for the number ofrooms on the floor
In this hotel, the third floor is used for restaurants. Theloop in this program should skip the entire third iteration.
Use for loop and while loop in the program
Sample ouput
How many floors does the hotel have?
How many rooms are on floor 1?
How many of those rooms are occupied?
How many rooms are on floor 2?
How many of those rooms are occupied?
How many rooms are on floor 4?
How many of those rooms are occupied?
How many rooms are on floor 5?
How many of those rooms are occupied?
How many rooms are on floor 6?
How many of those rooms are occupied?
The hotel has a total of 65 rooms.
53 are occupied.
12 are unoccupied.
The occupancy rate is 81.5%
Answer:
Here is the C++ program:
#include <iostream> //to use input output functions
using namespace std; //to identify objects like cin cout
int main(){ //start of main function
int MinFloors = 1; //minimum number of floors
int MinRooms = 10; //minimum number of rooms
int NoOfFloors; //stores number of floors
int NoOfRooms; //stores number of rooms
int OccupiedRooms; //stores number of rooms occupied
double TotalRooms=0, TotalOccupied=0; //stores computed total number of rooms and total number of occupied rooms
cout<<"How many floors does the hotel have? "; //prompts user to enter number of floors
do{ //iterates until the user enters valid number of floors
cout<<"(cannot be less than "<<MinFloors<<"): "; //error message
cin >>NoOfFloors; //reads number of floors from user
}while(NoOfFloors<MinFloors); //repeats as long as number of floors is less than minimum number of floors
for(int floor=1; floor <= NoOfFloors; floor++){ //iterates through the floors to skip third iteration
if(floor == 3){ //if floor is third floor
continue; }
cout<<"How many rooms are on floor " <<floor; //prompts user to enter number of floors
do{ //start of do while loop
cout<<"(cannot be less than "<<MinRooms<<"): "; //error message
cin >>NoOfRooms; //reads number of rooms from user
}while(NoOfRooms<MinRooms); //iterates as long as number of rooms are less than valid minimum number of rooms
TotalRooms += NoOfRooms; //adds number of rooms to the count of total number of rooms
cout<<"How many of those rooms are occupied?"; //prompts user to enter number of rooms occupied
do{ //start of do while loop
cout<<"(cannot be less than 0 or greater than "<<NoOfRooms<<"): "; //generates error message
cin >>OccupiedRooms; //reads number of rooms occupied by user
}while(OccupiedRooms<0 || OccupiedRooms>NoOfRooms); //iterates as long as the number of occupied rooms are less than 0 or greater than number of rooms
TotalOccupied += OccupiedRooms; } //adds number of rooms occupied to the count of total number of occupied rooms
cout<<"\nThe hotel has a total of "<<TotalRooms<<" rooms"<<endl; //displays the total number of rooms in the hotel
cout<<TotalOccupied<<" are occupied."<<endl; //displays the total number of occupied rooms
cout<<(TotalRooms-TotalOccupied)<<" are unoccupied."<<endl; //displays the total number of unoccupied rooms
cout<<"The occupancy rate is: "<<100*(TotalOccupied/TotalRooms)<<"%"<<endl; } //computes and displays the occupancy rate
Explanation:
The program first prompts the user to enter number of floors in the hotel. Lets say user enters 6. This is stored in NoOfFloors So
NoOfFloors = 6
So the loop runs for 6 times
Next it asks user to enter the number of rooms in the floor 1. Lets say user enters 12 so this is stored in NoOfRooms so
NoOfRooms = 12
TotalRooms += NoOfRooms;
this statement keeps adding number of rooms to TotalRooms so
TotalRooms = 12
Next program asks user about the number of occupied rooms. Lets say user enters 10 so this is stored in OccupiedRooms so
OccupiedRooms = 10
this statement keeps adding number of rooms to TotalOccupied so
TotalOccupied += OccupiedRooms;
TotalOccupied = 10
At next iteration program asks user again to enter number of rooms in floor 2. Suppose user enters 14 so
NoOfRooms = 12
TotalRooms += NoOfRooms;
TotalRooms = 12+14
TotalRooms = 26
Program asks again to enter number of occupied rooms so it becomes:
OccupiedRooms = 8
this statement keeps adding number of rooms to TotalOccupied so
TotalOccupied += OccupiedRooms;
TotalOccupied = 10+8
TotalOccupied = 18
Next is skips floor 3 and iteration 3. and asks user to enter number of rooms in floor 4. Suppose user enters 14
Number of rooms become:
TotalRooms = 12+14+14
TotalRooms = 40
and suppose user enters 14 as occupied rooms so total occupied become:
TotalOccupied = 10+8 + 14
TotalOccupied = 32
For floor 5: Suppose user enters 13
TotalRooms = 12+14+14+13
TotalRooms = 53
For floor 5: Suppose user enters 10
TotalOccupied = 10+8 + 14+10
TotalOccupied = 42
For floor 6: Suppose user enters 12
TotalRooms = 12+14+14+13+12
TotalRooms = 65
For floor 6: Suppose user enters 11
TotalOccupied = 10+8 + 14+10+11
TotalOccupied = 53
Now the loop breaks
Hence
TotalRooms = 65
TotalOccupied = 53
total unoccupied = TotalRooms-TotalOccupied = 65-53 = 12
The occupancy rate is: 100*(TotalOccupied/TotalRooms) = 100*(53/65) = 81.5385
The output of the program is attached in a screenshot.
Select the correct navigational path to mark all teachers who have achieved “excellent” on their evaluations a red background. Select the rows or columns you wish to format. Click the (Home, Page layout, data, view) tab on the ribbon and look in the (Clipboard, alignment, number, conditional formatting) gallery. Select (New rule, manage rule, clear rule) . Select ( format only top or bottom, format all cells, use a formula) and fill in the formula for the IF statement and formatting. Click OK.
Answer:
View, Cond. Form., New rule, Format
Explanation:
:p Don't ask.
Answer:
Click the home tab
conditional formatting
select new rule
select "use a formula"
Explanation:
correct on edge 2020
Plz answer me will mark as brainliest
Answer:
Processor is located on [tex]{\underline{\blue{\textrm{CPU}}}}[/tex]
The barcode is also called [tex]{\underline{\blue{\textrm{Universal Product code}}}}[/tex].
Which options are available in the Conditional Formatting dialog box? Check all that apply.
play a specified sound
create a calendar event
flag message for follow up
stop processing more rules
permanently delete a message
move a message to a specified folder
Answer:
Except the second one, all are correct.
Explanation:
On edg
A number is a palindrome if its reversal is the same as itself. Write a program reversenumber.java to do the following:
1. Define a method call reverse, which takes a 4-digit integer and returns an integer in reverse. For example, reverse(1234) should return 4321. (Hint: use / and % operator to separate the digits, not String functions)
2. In the main, take user input of a series of numbers, call reverse method each time and then determine if the number is a palindrome number, for example, 1221 is a palindrome number, but 1234 is not.
3. Enhance reverse method to work with any number, not just 4-digit number.
The given Java program takes a number as input from the user, reverses it, and checks if it is a palindrome. It uses the modulo and division operations to reverse the number. The program is not limited to 4-digit numbers and can handle numbers of any length.
```java
import java.util.Scanner;
public class ReverseNumber {
// Method to reverse a given number
public static int reverse(int num) {
int reversed = 0;
// Reversing the number using modulo and division operations
while (num != 0) {
int digit = num % 10;
reversed = reversed * 10 + digit;
num /= 10;
}
return reversed;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Taking user input
System.out.print("Enter a number: ");
int number = scanner.nextInt();
// Reversing the number
int reversedNumber = reverse(number);
// Checking if the reversed number is equal to the original number
if (number == reversedNumber) {
System.out.println(number + " is a palindrome number.");
} else {
System.out.println(number + " is not a palindrome number.");
}
scanner.close();
}
}
```1. The `reverse` method takes an integer as input and reverses it using the modulo and division operations. It initializes `reversed` as 0 and in each iteration of the while loop, it separates the last digit of the input number using `num % 10`, appends it to `reversed` by multiplying it with 10, and then updates `num` by dividing it by 10.
This process is repeated until `num` becomes 0. Finally, the method returns the reversed number.
2. In the `main` method, we create a `Scanner` object to take user input. We prompt the user to enter a number, read it using `nextInt()`, and store it in the `number` variable.
We then call the `reverse` method to get the reversed number and store it in the `reversed Number` variable.
Finally, we compare `number` and `reversed Number` to check if the number is a palindrome or not. The result is printed accordingly.
3. The provided solution already works with any number, not just 4-digit numbers. This is because the `reverse` method separates the digits of the input number and reverses them regardless of the number of digits.
For more such questions palindrome,Click on
https://brainly.com/question/23161348
#SPJ8
What is a formula? What is a function? (In the context of Excel)
Answer: A formula is an expression which calculate the value of a cell .A funcation is a predefined formula that performs calculations using specific values in particular order.According to context of excel.
3.2 code practice question 1
Answer:
Not enough question content.
Explanation:
what word describes the complexity of document
Answer:
Explanation:
This study aimed to systematically identify and evaluate the readability and document complexity of currently available family history tools for the general public. Three steps were undertaken to identify family history tools for evaluation: (a) Internet searches, (b) expert consultation, and (c) literature searches. Tools identified were assessed...
I am writing a code that requires me to identify a positive integer as a prime (or not). I have looked at references on how to find it but it does not work for what I am trying to do. Below is the set of instructions. I have written the first half of the code and verified that it works. I am stuck on how to write the logic that identifies the prime based on the instructions.
-----
Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number.
Your program should use a loop to validate the positive integer and accept the input only when the user inputs a positive number.
Your code should be an efficient algorithm using the following note.
(Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)
For the square root, import the math library (import math) and use math.sqrt() function)
import math
number = int(input("Enter a number: "))
while number < 0:
number = int(input("Enter a number: "))
if number % 2 == 0:
if number == 2:
print("Your number is a prime.")
exit()
print("Your number is not a prime.")
exit()
elif number % 2 == 1:
i = 2
while i <= math.sqrt(number):
if number % i == 0:
print("Your number is not a prime ")
exit()
i += 1
print("Your number is a prime.")
I hope this helps!
1. A flowchart of this program. (Include the hand calculated expected output value. I pts)
2. Printout of your C++ program with a heading comment (with proper spacing and indentation)
3. Copy of a screenshot after your program is executed. (2 and 3: 2 pts cach)
4. Analyze the program and describe what makes the output to be different in plain English. ELEN 1381 Programming Assignment #4. Name Your name. Student ID : Your student ID #. Due date : Due date Purpose of the program : Calculate an average of four numbers. Section 1 : Enter four numbers. Section 2 : Calculate the average and display the answer. Section 3 : Calculate the average and display the answer. #include using namespace std; int main() int ni, n2, n3, n4, a; double b; // Section 1. cout << "Enter last digit of your Student ID : "; cin >> ni; cout << "Enter last digit of your Student ID +1: "; cin >> n2; cout << "Enter last digit of your Student ID + 2 : "; cin >> n3; cout << "Enter last digit of your Student ID + 4 : "; cin >> n4; // Section 2. a = (nl + n2 + n3 + 04) / 4; cout << "The average is : " < a << endl; 1/ Section 3. b = (nl + n2 + n3 + n4) / 4.0; cout << "The average is : " << b << endl; ; return ) // main
Answer:
See Explanation
Explanation:
1. See Attachment 1 (image file) for flowchart
2. & 3. See Attachment 2 for source file (Note that I've made some corrections on the source code)
4. What makes the outputs (a and b) to be different is that;
a calculates the average of the given parameters as a = (ni+n2+n3+n4)/4
While
b calculates a different expression = (ni+n2+n3+04)/4
They will only have the same output if n4 = 4
Need answer quick
In windows, the desktop is simply a folder that resides in your main user folder.
true or false?
Answer:
true
Explanation:
Given a phrase stored in the variable phrase, write code to construct an acronym made up of the first letter of each word in the phrase. For example, the phrase 'Portable Network Graphics' would produce the acronym 'PNG'. Store the result in a variable named acronym, ensuring that it is composed of all uppercase letters. Assume that there is no whitespace on either end of the phrase and that one space character separates each word.
this is what I put but its wrong
phrase = input()
acronym = ""
lst = phrase.split()
for x in lst:
if (len(x) > 0):
acronym += x[0]
acronym=acronym.upper()
print(acronym)
Answer:
Your program is correct; it only lacks proper indentation
See Explanation
Explanation:
The only correction to your question is to rewrite using proper indents.
See below
phrase = input()
acronym = ""
lst = phrase.split()
for x in lst:
if (len(x) > 0):
acronym += x[0]
acronym=acronym.upper()
print(acronym)
Note that:
You make use of indents when you have loop statements like (for) and conditional statements like (if)
A string s is a circular shift of a string t if it matches when the the characters are circularly shifted by any number of positions. For example, ACTGACG is a circular shift of TGACGAC, and vice versa. Detecting this condition is important in the study of genomic sequences. Write a program that checks whether two given strings s and t are circular shifts of one another.
Hint: The solution is a one-liner with indexOf() and string concatenation.
Daily requirements of 70 g of protein, 1 g calcium, 12 mg iron, and 3000 calories are needed for a balanced diet. The following foods are available for consumption with the cost and nutrients per 100 g as shown.
Protein
(g)
Calories
Calcium
(g)
Iron
Cost
GH¢
Brown Bread
12
246
0.1
3.2
0.5
Cheese
24.9
423
0.2
0.3
2
Butter
0.1
793
0.03
0
1
Baked Beans
6
93
0.05
2.3
0.25
Spinach
3
26
0.1
2
0.25
The objective is to find a balanced diet with minimum cost.
(a) Formulate a linear programming model for this problem.
(b) Use solver to find optimal solution and sensitivity report.
Answer:
i think i know
Explanation:
Describe what should go into the blank space:
public class
A. a keyword
B. java syntax
C. a command
D. the name of the program
Answer:
d
Explanation:
Discuss how people navigated and communicated before the evolution of digital communication systems. What are the advantages of digital communication systems?
Answer:
Here are the examples!!! (Sorry if they are wrong)
.Meeting new people and not having to get sick from corona.
.Chatting with your friends online!.
Explanation:
That's all i could think of.
which of the following best describes information techonolgy (IT)?
Answer:
IT can be purchased; IS cannot be purchased
Explanation:
Yeah
PLEASE HELPP!!!!!
Select all that apply.
Proper numeric keyboarding technique includes:
1.looking at the keys
2.resting your fingers gently on the home keys
3.stiffening your fingers
4.keeping your wrist straight
5.pressing the keys squarely in the center
Answer:
1, 2 and 5
Explanation:
see picture to make sure they are in the correct order for you.
Answer:
resting your fingers gently on the home keys
keeping your wrist straight
pressing the keys squarely in the center
Variables used for input are associated with what controls on a form ?
Answer:
The answer to this question is given below in the explanation section
Explanation:
There are different forms control. for example HTML form controls are:
Text Input Controls. Checkboxes Controls. Radio Box Controls. Select Box Controls. File Select boxes. Hidden Controls. Clickable Buttons. Submit and Reset Button.to take input from the user and store it into the variable, mostly text input form control is used.
however, you can also use text input, checkbox, radio button as a control to take input from the user and store the input value in some variables.
Trace the following pseudocode. List the values of COUNTER and ANSWER throughout and then show the final values.
a. Set COUNTER to 0.
b. Set ANSWER to 100.
c. Divide ANSWER by 2 and set ANSWER to the new result
d. If ANSWER is even, go back to step 3 and add 1 to COUNTER. If ANSWER is odd, go to the next line.
e. Repeat lines 6 and 7 until COUNTER is greater than 3
f. Increase ANSWER by the value of COUNTER.
g. Increase COUNTER by 1.
h. While COUNTER is greater than or equal to 2 do lines 9 and 10.
i. Decrease ANSWER by 5
j. Decrease COUNTER by 1
k. Display ANSWER and COUNTER
Answer:
ANSWER = 16
COUNTER = 1
Explanation:
a. COUNTER = 0
b. ANSWER = 100
c. ANSWER = 100/2 = 50
d. ANSWER (50) is even, so it goes back to (c)
ANSWER = 50/2 = 25
and
COUNTER = COUNTER + 1 = 0 + 1 =1
ANSWER is now odd (25), so it moves to (e)
e. f and g will be executed as follows.
f. ANSWER = ANSWER + COUNTER = 25 + 1 = 26
g. COUNTER = COUNTER+1 = 1 + 1 = 2.
COUNTER is not greater than 3, so f & g will be executed again
f. ANSWER = 26 + 2 = 28
g. COUNTER = 2 + 1 = 3.
And again
f. ANSWER = 28 + 3 = 31
g. COUNTER = 3 + 1 = 4
Now, execution will proceed to h
h. i and j will be executed as follows
i. ANSWER = ANSWER - 5 = 31 - 5 = 26
j. COUNTER = COUNTER - 1 = 4 - 1 = 3
COUNTER ≥ 2, so it'll be executed again
i. ANSWER = 26 - 5 = 21
j. COUNTER = 3 - 1 = 2
And again...
i. ANSWER = 21 - 5 = 16
j. COUNTER = 2 - 1 = 1
Now, the condition is no longer valid.
So, execution proceed to k
k. The displayed values of ANSWER and COUNTER is 16 and 1, respectively.
Plz answer me will mark as brainliest
Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file. B. The sum of all the numbers in the file. C. The average of all the numbers in the file. You must determine how many numbers are in the file by searching for the end of the list of numbers. You are not allowed to hard code the expected number of numbers into your code. The file random.txt is located in the Lab 4 Canvas Module. Here is the result you should get: Number of numbers: 200 Sum of the numbers: 105527 Average of the numbers: 527.635
Answer:
Here is the C++ program:
#include <iostream> //to use input output functions
#include <fstream> //to manipulate files
using namespace std; //to identify objects like cin cout
int main(){ //start of main function
ifstream file; //creates an object of ifstream
file.open("random.txt"); //open method to open random.txt file using object file of ifstream
int numCount = 0; //to store the number of all numbers in the file
double sum = 0; //to store the sum of all numbers in the file
double average = 0.0; //to store the average of all numbers in the file
int number ; //stores numbers in a file
if(!file){ //if file could not be opened
cout<<"Error opening file!\n"; } //displays this error message
while(file>>number){ //reads each number from the file till the end of the file and stores into number variable
numCount++; //adds 1 to the count of numCount each time a number is read from the file
sum += number; } //adds all the numbers and stores the result in sum variable
average = sum/numCount; //divides the computed sum of all numbers by the number of numbers in the file
cout<<"The number of numbers in the file: "<<numCount<<endl; //displays the number of numbers
cout<<"The sum of all the numbers in the file: "<<sum<<endl; //displays the sum of all numbers
cout<<"The average of all the numbers in the file: "<< average<<endl; //displays the average of all numbers
file.close(); } //closes the file
Explanation:
Since the random.txt is not given to check the working of the above program, random.txt is created and some numbers are added to it:
35
48
21
56
74
93
88
109
150
16
while(file>>number) statement reads each number and stores it into number variable.
At first iteration:
35 is read and stored to number
numCount++; becomes
numCount = numCount + 1
numCount = 1
sum += number; this becomes:
sum = sum + number
sum = 0 + 35
sum = 35
At second iteration:
48 is read and stored to number
numCount++; becomes
numCount = 1+ 1
numCount = 2
sum += number; this becomes:
sum = sum + number
sum = 35 + 48
sum = 83
So at each iteration a number is read from file, the numCount increments to 1 at each iteration and the number is added to the sum.
At last iteration:
16 is read and stored to number
numCount++; becomes
numCount = 9 + 1
numCount = 10
sum += number; this becomes:
sum = sum + number
sum = 674 + 16
sum = 690
Now the loop breaks and the program moves to the statement:
average = sum/numCount; this becomes:
average = 690/10;
average = 69
So the entire output of the program is:
The number of numbers in the file: 10 The sum of all the numbers in the file: 690 The average of all the numbers in the file: 69
The screenshot of the program and its output is attached.
What is the best location for the criteria range when filtering data?
A) immediately above the data you wish to sort
B) immediately below the data you wish to sort
C) immediately to the left of the data you wish to sort
X D) immediately to the right of the data you wish to sort
(It's NOT D)
Answer:
It's A
Explanation:
Anwser on E2020, just did it
Answer:
immediately above the data you wish to sort
Explanation:
Sami is creating a web page for her dog walking business. Which item will set the theme for her page?
a) Background color
b) Heading color
c) Link color
d) Text color
Answer:
A
Explanation:
Cam is creating a program to display the cost of groceries. The output will be a graph showing the change in prices over several months.
Which Python module should Cam use to draw a line on the screen?
Cam could use the Turtle module to draw a line on the screen.
I hope this helps!
Answer:
turtle graphics
Explanation:
turtle graphics is the only on ethatputs a line or shape on the screen using proccessof elimination.
Java Eclipse homework. I need help coding this
Project 9B - Tuition
package: proj9B
class: Tuition
Write code using the if, else if and else statements that will take care of the following.
We are going to be writing code for a college to determine the cost of a students tuition. Use the following information for your program.
Collect and store the users First and Last Name.
Collect and store the users age and number of quarter credits.
Process the information and print an invoice showing the above information and include a projected tuition cost.
Program Parameters
Tuition for a course is free for people over the age of 65.
There is a fifty percent discount for those between the ages of 60 and 65.
Full-tuition cost is $250.00 per credit
Maximum credits is 18 per quarter.
(Note: Use appropriate (DecimalFormat) code to get the two zeros to print)
Example Printout:
Michael, Smith
Age: 62, Credits: 15
“You saved 50 percent on the cost of this course because you are between 60 and 65. Your cost is $1875.00.”
OR if age is >65: “Wow, are you lucky. Age is sometimes a real cool thing. This course is free for you!”
Make sure that it compiles and runs. When it does, save it according to your teacher’s directions.
I've included my code in a text file. I hope this helps!
In the Scrum board, prioritizing the issue backlog is done in the ———- mode.
Answer:
The answer to this question is given below in the explanation section
Explanation:
Scrum Board is a tool that is used by the scrum teams to view the product backlog. The Scrum task board makes the sprint backlog visible for the team.
In the Scrum board, prioritizing the issue backlog is done in the Current View mode.
However, it is noted that in Scrum board there are two view modes (Tree view mode and List view mode) for the issues in the backlog. The issues that are prioritized is listed in the current view mode.