Write an expression that continues to bid until the user enters 'n'.
Sample output with inputs: 'y' 'y' 'n'
I'll bid $7!
Continue bidding? I'll bid $15!
Continue bidding? I'll bid $23!
Continue bidding?
1 import random
2 random.seed (5)
3
4 keep going
5 next bid = 0
6
7 while Your solution goes here
8 next bid next bid + random.randint(1, 10)
9 print(' ll bid x ' (next bid))
10 print('cohtinue bidding?', end-
11 keep going input
ACTIVITY 53.3. While loop: Insect growth
Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow each number with a space.
Sample output with input:
8 8 16 32 64 1 nu
1 insects = int(input()) Must be
2
3 Your solution goes here

Answers

Answer 1

Answer:

1)

Add this while statement to the code:

while(keep_going!='n'):  

#the program keeps asking user to continue bidding until the user enter 'n' to stop.

2)

Here is the code for ACTIVITY 53.3. While loop: Insect growth:

num_insects = int(input())

while num_insects <= 100:

   print(num_insects, end=' ')

   num_insects = num_insects * 2

 

Explanation:

Here is the complete code for 1)

import random

random.seed (5)

keep_going='-'

next_bid = 0

while(keep_going!='n'):

   next_bid = next_bid + random.randint(1, 10)

   print('I\'ll bid $%d!' % (next_bid))

   print('continue bidding?', end='')

   keep_going = input()

Here the the variable keep_going is initialized to a character dash keep_going='-'

The statement keep_going = input() has an input() function which is used to take input from user and this input value entered by user is stored in keep_going variable. while(keep_going!='n'):  is a while loop that keeps iterating until keep_going is not equal to 'n'.    print('continue bidding?', end='')  statement prints the continue bidding? message on the output screen. For example the user enters 'y' when this message appears on screen. So keep_going = 'y' . So the operation in this statement next_bid = next_bid + random.randint(1, 10) is executed in which next_bid is added to some randomly generated integer within the range of 1 to 10 and print('I\'ll bid $%d!' % (next_bid))  prints the result on the screen. Then the user is prompted again to continue biffing. Lets say user enters 'n' this time. So keep_going = 'n'. Now the while loop breaks when user enters 'n' and the program ends.

2)

num_insects = int(input()) #the user is prompted to input an integer

while num_insects <= 100: #the loop keeps iterating until value of num_insects exceeds 100

   print(num_insects, end=' ') #prints the value of num_insects  

   num_insects = num_insects * 2 #the value of num_insects is doubled

For example user enters 8. So

num_insects = 8

Now the while loop checks if this value is less than or equal to 100. This is true because 8 is less than 100. So the body of while loop executes:

   print(num_insects, end=' ') statement prints the value of num_insects

So 8 is printed on the screen.

num_insects = num_insects * 2 statement doubles the value of num_insects So this becomes:

num_insects = 8 * 2

num_insects = 16

Now while loop checks if 16 is less than 100 which is again true so next 16 is printed on the output screen and doubled as:

num_insects = 16 * 2

num_insects = 32

Now while loop checks if 32 is less than 100 which is again true so next 32 is printed on the output screen and doubled as:

num_insects = 32 * 2

num_insects = 64

Now while loop checks if 64 is less than 100 which is again true so next 64 is printed on the output screen and doubled as:

num_insects = 64 * 2

num_insects = 128

Now while loop checks if 128 is less than 100 which is false so the program stops and the output is:

8 16 32 64  

The programs along with their output is attached.

Write An Expression That Continues To Bid Until The User Enters 'n'. Sample Output With Inputs: 'y' 'y'
Write An Expression That Continues To Bid Until The User Enters 'n'. Sample Output With Inputs: 'y' 'y'

Related Questions

Write a recursive definition of x^n, where n≥0, similar to the recursive definition of the Fibonacci numbers. How does the recursion terminate?

Answers

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

int recurs(int x, int n)//defining a method recurs that accepts two parameter

{

if(n==0)//defining if block that checks n value

{

return 1;//return value 1

}

else//defining else block

{

return x*recurs(x,n-1);//use return keyword that retun value

}

}

int main()//defining main method

{

cout<<recurs(5,3); //use print method to call recurs method

   return 0;

}

Output:

125

Explanation:

In the above-given program, the integer method "recurs" is declared which accepts, two integer variables, which are "x, n", inside the method the if conditional statement is used.

In the if block, it checks the value of n is equal to "0" if this condition is true, it will return a value, that is 1. Otherwise, it will go to the else block, in this block, it will use the recursive method to print its value.    

Recursions are functions that execute itself from within.

The recursive definition x^n in Python, where comments are used to explain each line is as follows:

#This defines the function

def recursion(x, n):

   #This returns 1, if n is 0

   if(n==0):

       return 1

   #This calculates the power recursively, if otherwise

   else:

       return x*recursion(x,n-1);

The function terminates when the value of n is subtracted till 0

Read more about recursions at:

https://brainly.in/question/634885

What AI technology is commonly used to describe Input A to Output B mappings?

Answers

Answer:

Supervised learning

Explanation:

Supervised learning is a term widely used in computer engineering that describes a form of the machine learning process, which is based on understanding a task that maps an input to an output based on illustration input A to output B pairs.

Hence, in this case, AI technology that is commonly used to describe Input A to Output B mappings is called SUPERVISED LEARNING

Which one of the following statements is false? A. As storage is now cheap and plentiful, modern code management systems are less concerned with optimizing storage. B. Sub-version is the best-known, open-source code management product that is based around a centralized repository. C. In the open-source software development model, many different people can work independently on the code without any knowledge of what others are doing. D. The oldest and perhaps best-known system building tool is "Ant", which was originally developed in the 1970s for Unix.

Answers

Answer:

D. The oldest and perhaps best-known system building tool is "Ant", which was originally developed in the 1970s for Unix.

Explanation:

Ant often referred to Apache Ant is a computer software tool, though popularly considered oldest, was originally first built in the year 2000 by Unix, on Java platform, which is utilized as a component of plug-in development.

Hence, given the available options, the correct answer is Option D, because, Ant originally built in the year 2000 and not the year 1970, while the other statements are definitely correct.

The most common type of monitor for a laptop or desktop is a

Answers

Liquid Clear Display

Answer:

LCD monitor

explanation

it incorporates one of the most advanced technologies available today.

Write an application that asks a user to enter an integer. Display a statement that indicates whether the integer is even or odd.

Answers

Answer:

in C++:

#include <iostream>

int main(){

int input;

std::cout<<"Enter a number: "<<std::endl;

std::cin>>input;

if(input%2==0){

std::cout<<" The number is even"<<std::endl;

}else{

std::cout<<"The number is odd"<<std::endl;

}

}

Explanation:

Getting user input as integer, and check if NUMBER÷2 have remainder=0 or no, if remainder==0 then number is even else number is odd

Identify the most common level of education for a programmer or software developer.
a bachelor's degree
a PhD
a high school diploma
a certificate

Answers

A bachelors degree, namely in Computer Science

Answer:

A. a bachelor's degree

Explanation:

Which of the following is an example of self-directed learning?

Answers

Answer:

Self directed learning is an the strategy the students guidance from that teacher decide and students they will learn.

Explanation:

Self directed learning its a effective technique that can anyone to use the learning in a school time into a curriculum program, there are many type of characteristics:- (1) Flexibility (2) Autonomy (3) Self acceptance (4) Playfulness.

Self directed learning is to perform that allow us to the initiative own learning, students grow and improve the motivation and integrity to the learning.Self directed learning to that contain the self learning with the internet program, and apply to the skill outside of the area learning.Self directed learning to the set of goal that the business and career and the achieve of the goal.Self directed learning to contain your  interests and motivate yourself and reflecting the learners.Self directed learning is to provide learn strategies and methods to achieve the better lives and behavior can translate.Self directed is the value to the teamwork and help the students and learner work in better team.Self learning is perform physical side learning and the focus on the mental side, and they we are putting in heads.Self learning is to contain the better your learning  standards and to measure learning goals.

Answer:

B

I got it on edge

What three conditions must be satisfied in order to solve the critical section problem?

Answers

Answer:

Explanation:

The critical section problem revolves around trying to ensure that at most one process is executing its critical section at a given time. In order to do so, the three following conditions must be met.

First, no thread may be executing in its critical section if there is already a current thread executing in its critical section.

Second, only the specific threads that are not currently occupied executing in their critical sections are allowed to participate in deciding which process will enter its critical section next.

Third, a preset limit must exist on the number of times that other threads are allowed to enter their critical state after a thread has made a request to enter its critical state.

Write code to complete factorial_str()'s recursive case. Sample output with input: 5 5! = 5 * 4 * 3 * 2 * 1 = 120

Answers

Answer:

Here is the complete code to complete factorial_str()'s recursive case:

Just add this line to the recursive part of the code for the solution:

output_string += factorial_str(next_counter,next_value)  

The above statement calls factorial_str() method recursively by passing the values of next_counter and next_value. This statement continues to execute and calls the factorial_str() recursively until the base case is reached.

Explanation:

Here is the complete code:

def factorial_str(fact_counter, fact_value):  #method to find the factorial

   output_string = ''   #to store the output (factorial of an input number)

   if fact_counter == 0:  # base case 1 i.e. 0! = 1

       output_string += '1'  # displays 1 in the output

   elif fact_counter == 1:  #base case 2 i.e. 1! = 1

       output_string += str(fact_counter) + ' = ' + str(fact_value)  #output is 1

   else:  #recursive case

       output_string += str(fact_counter) + ' * '  #adds 8 between each value of fact_counter

       next_counter = fact_counter - 1  #decrement value of fact_counter by 1

       next_value = next_counter * fact_value  #multiplies each value of fact_value by next_counter value to compute the factorial

       output_string += factorial_str(next_counter,next_value) #recursive call to factorial_str to compute the factorial of a number

   return output_string   #returns factorial  

user_val = int(input())  #takes input number from user

print('{}! = '.format(user_val),end="")  #prints factorial in specified format

print(factorial_str(user_val,user_val))  #calls method by passing user_val to compute the factorial of user_val

I will explain the program logic with the help of an example:

Lets say user_val = 5

This is passed to the method factorial_str()

factorial_str(fact_counter, fact_value) becomes:

factorial_str(5, 5):  

factorial_str() method has two base conditions which do not hold because the fact_counter is 5 here which is neither 1 nor 0 so the program control moves to the recursive part.

output_string += str(fact_counter) + ' * '  adds an asterisk after the value of fact_counter i.e. 5 as:

5 *

next_counter = fact_counter - 1 statement decrements the value of fact_counter  by 1 and stores that value in next_counter. So

next_counter = 5 - 1

next_counter = 4

next_value = next_counter * fact_value  multiplies the value of next_counter by fact_value and stores result in next_value. So

next_value = 4 * 5

next_value = 20

output_string += factorial_str(next_counter,next_value)  this statement calls the factorial_str() to perform the above steps again until the base condition is reached. This statement becomes:

output_string = output_string + factorial_str(next_counter,next_value)

output_string = 5 * 4 = 20

output_string = 20

Now factorial_str(next_counter,next_value) becomes:

factorial_str(4,20)

output_string += str(fact_counter) + ' * ' becomes

5 * 4 * 3

next_counter = fact_counter - 1  becomes:

4 - 1 = 3

next_counter = 3

next_value = next_counter * fact_value  becomes:

3 * 20 = 60

next_value = 60

output_string = 5 * 4 * 3= 60

output_string = 60

factorial_str(next_counter,next_value) becomes:

factorial_str(3,60)

output_string += str(fact_counter) + ' * ' becomes

5 * 4 * 3 * 2

next_counter = fact_counter - 1  becomes:

3 - 1 = 2

next_counter = 2

next_value = next_counter * fact_value  becomes:

2 * 60 = 120

next_value = 120

output_string += factorial_str(next_counter,next_value) becomes:

output_string = 120 + factorial_str(next_counter,next_value)

output_string = 5 * 4 * 3 * 2 = 120

factorial_str(2,120)

output_string += str(fact_counter) + ' * ' becomes

5 * 4 * 3 * 2 * 1

next_counter = fact_counter - 1  becomes:

2 - 1 = 1

next_counter = 1

next_value = next_counter * fact_value  becomes:

1 * 120 = 120

next_value = 120

output_string += factorial_str(next_counter,next_value) becomes:

output_string = 120 + factorial_str(next_counter,next_value)

factorial_str(next_counter,next_value) becomes:

factorial_str(1, 120)

Now the base case 2 evaluates to true because next_counter is 1

elif fact_counter == 1

So the elif part executes which has the following statement:

output_string += str(fact_counter) + ' = ' + str(fact_value)  

output_string = 5 * 4 * 3 * 2 * 1 = 120

So the output of the above program with user_val = 5 is:

5! = 5 * 4 * 3 * 2 * 1 = 120

Following are the recursive program code to calculate the factorial:

Program Explanation:

Defining a method "factorial_str" that takes two variable "f, val" in parameters.Inside the method, "s" variable as a string is defined, and use multiple conditional statements.In the if block, it checks f equal to 0, that prints value that is 1.In the elif block, it checks f equal to 1, that prints the value is 1.In the else block, it calculates the factor value and call the method recursively, and return its value.Outside the method "n" variable is declared that inputs the value by user-end, and pass the value into the method and print its value.

Program:

def factorial_str(f, val):#defining a function factorial_str that takes two parameters

   s = ''#defining a string variable

   if f == 0:#defining if block that check f equal to 0

       s += '1'#adding value in string variable

   elif f == 1:#defining elif block that check f equal to 1

       s += str(f) + ' = ' + str(val)#printing calculated factorial value

   else:#defining else block that calculates other number factorial

       s += str(f) + ' * '#defining s block that factorial

       n = f - 1#defining n variable that removes 1

       x = n * val#defining x variable that calculate factors

       s += factorial_str(n,x)#defining s variable that calls factorial_str method recursively  

   return s#using return keyword that returns calculated factors value  

n = int(input())#defining n variable that inputs value

print('{}! = '.format(n),end="")#using print method that prints value

print(factorial_str(n,n))#calling method factorial_str that prints value

Output:

Please find the attached file.

Learn more:

brainly.com/question/22777142

To move a file or folder in Microsoft Windows you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as

Answers

Answer:

**UNSURE** Cutting and pasting*

Explanation:

Its essentially the same thing. Nowadays File Explorer will instead copy the file to the new location in certain circumstances, such as if the destination is a separate drive.

*I'm not sure if this is the type of answer you are looking for, as I'm not sure what context this is in. If you're looking for a specific term regarding that type of action in the user interface, this might not be it.

Write a simple command-line calculator with an exception handler that deals with nonnumeric operands. Your program should display a message that informs the user of the wrong operand type before exiting. It should also ask the user to re-input the number to finish the calculation.

Answers

Answer:

Here is the JAVA program:

import java.util.InputMismatchException;  // exception that is thrown when input does not match the expected type

import java.util.Scanner;  //used to take input from user

public class Main {

public static void main(String[] args) { //start of main function

   Scanner input = new Scanner(System.in);  // creates Scanner class object

   double num1=0.0;  // double type operand 1

   double num2=0.0;  // double type operand 2

   System.out.println("Please enter 2 operands");  //prompts user to enter two operands

   try {  //defines a chunk of code to be tested for non numeric operand error

      num1 = input.nextDouble();  //reads operand 1 value

      num2 = input.nextDouble(); //reads operand 2 value

         

   } catch (InputMismatchException  ex) {  //code chunk executed when exception occurs in program

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");  //displays wrong operand type if user enters non numeric operands

     System.exit(1);  }//exits the program    

   System.out.print("Enter an operator (+, -, *, /): ");  //prompts user to enter an operator

       char operator = input.next().charAt(0);  //reads the input operator

       double result;  // to store the result of the operation

       switch(operator)         {  //decided operation on basis of input operator

           case '+':  // if user enters + operator

               result = num1 + num2;  //adds two operands

               break;

            case '-':  // if user enters - operator

               result = num1 - num2;  //subtracts two operands

               break;  

           case '*':  // if user enters * operator

               result = num1 * num2;  //multiplies two operands

               break;  

           case '/':  // if user enters / operator

               result = num1 / num2;  //divided two operands

               break;  

           default:  //if user enters wrong operator

               System.out.printf("wrong operator!");  //displays wrong operator

               return;          }  

       System.out.printf("%.1f %c %.1f = %.1f", num1, operator, num2, result); }} //displays the result of the operation

Explanation:

The program is well explained in the comments mentioned with each line of program. The user is prompted to enter the values of two operands num1 and num2. The try block is used to test for non numeric operand error and throws InputMismatchException when any of the input operands (num1 or num2) is non numeric. InputMismatchException is thrown by Scanner class. This informs that the token retrieved (which is the num1 or num2 operand) does not match the expected type (which is type numeric). When this error occurs in the program, catch block is used to execute a code chunk, which is the print statement in this program. The print statement informs the user of the wrong operand type before exiting. It also asks the user to re-input the number to finish the calculation and the wrong input type is also mentioned in the output that is to be re-input.

If you want the program to take the input again from user after throwing this exception then you can alter the above program by using two try catch blocks separately for the two operands:

//for operand 1 i.e. num1

System.out.println("Please enter operand 1: ");

   try {

      num1 = input.nextDouble();        

   } catch (InputMismatchException  ex) {

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");

      num1 = input.nextDouble();  }  //reads input of operand 1 again from user

//for operand 2 i.e. num2

          System.out.println("Please enter operand 2: ");  

      try {

      num2 = input.nextDouble();  

   } catch (InputMismatchException  ex) {

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");

     num2 = input.nextDouble();  } //reads input of operand 1 again from user

The program and its output is attached.

the content of a text is its

Answers

Text content informs, describes, explains concepts and procedures to our readers

A keyboard would be considered____. Select 2 options.

Answers

Answer:

hardware

an input device

Explanation:

the ohter options are not applicable

The answer here would be Hardware and Input device as it is considered a peripheral and its also inputting to the computer

Write code to complete PrintFactorial()'s recursive case. Sample output if userVal is 5:5! = 5 * 4 * 3 * 2 * 1 = 120

Answers

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

using namespace std;   //to access objects like cin cout

void PrintFactorial(int factCounter, int factValue){  // method definition

  int nextCounter = 0;  // initialize value of nextCounter by 0

  int nextValue = 0;   // initialize value of nextValue by 0

  if (factCounter == 0) { //base case 1: 0! = 1          

     cout << "1" << endl;    }  //displays 1 in the output

  else if (factCounter == 1) {  //base case 2: 1! = 1  

     cout << factCounter << " = " << factValue << endl;    } //displays 1 in result    

  else {  //recursive case                          

     cout << factCounter << " * ";

     nextCounter = factCounter - 1;  //decrements factCounter by 1

     nextValue = nextCounter * factValue;  // multiplies values of nextCounter and factValue and assigns the result to nextValue

PrintFactorial( nextCounter,  nextValue);    } }  //recursively calls PrintFactorial method to compute the factorial

int main() {  //start of main function

  int userVal = 0;   //initialize the userVal variable to 0

  userVal = 5;  //assigns 5 to the userVal variable

  cout << userVal << "! = ";  //prints the userVal with ! =

  PrintFactorial(userVal, userVal); } //calls PrintFactorial method to compute the factorial of userVal i.e. 5

Explanation:

I will explain the logic of the program with an example.

The value of variable userVal is 5  

This is passed to the method PrintFactorial()

1st step:

void PrintFactorial(int factCounter, int factValue) becomes:  

PrintFactorial(5, 5)

PrintFactorial method has two base conditions which do not hold because the factCounter is 5 here which is neither 1 nor 0 so the program control moves to the recursive part.  

cout << factCounter << " * ";

In recursive part, the above statement prints the value of factCounter  followed by an asterisk on the output screen. So this prints:

5 *

nextCounter = factCounter - 1;

This statement decrements the value of factCounter by 1 and assigns it to nextCounter as:

nextCounter = 5 - 1;

nextCounter = 4

nextValue = nextCounter * factValue;  multiplies the value of nextCounter by factValue and stores result in nextValue . So

nextValue = 4 * 5  

nextValue = 20

PrintFactorial( nextCounter,  nextValue);  this statement calls the PrintFactorial() recursively to perform the above steps again until the base condition is reached. This statement becomes:  

PrintFactorial(4,20)

2nd step:

PrintFactorial method has two base conditions which do not hold because the factCounter is 4 here which is neither 1 nor 0 so the program control moves to the recursive part.  

cout << factCounter << " * ";

In recursive part, the above statement prints the value of factCounter  followed by an asterisk on the output screen. So this prints:

5* 4 *

nextCounter = factCounter - 1;

This statement decrements the value of factCounter by 1 and assigns it to nextCounter as:

nextCounter = 4 - 1;

nextCounter = 3

nextValue = nextCounter * factValue;  multiplies the value of nextCounter by factValue and stores result in nextValue . So

nextValue = 3 * 20

nextValue = 60

PrintFactorial( nextCounter,  nextValue);   This statement becomes:  

PrintFactorial(3,60)

3rd step:

PrintFactorial method has two base conditions which do not hold because the factCounter is 3 here which is neither 1 nor 0 so the program control moves to the recursive part.  

cout << factCounter << " * ";

In recursive part, the above statement prints the value of factCounter  followed by an asterisk on the output screen. So this prints:

5* 4 * 3 *

nextCounter = factCounter - 1;

This statement decrements the value of factCounter by 1 and assigns it to nextCounter as:

nextCounter = 3 - 1;

nextCounter = 2

nextValue = nextCounter * factValue;  multiplies the value of nextCounter by factValue and stores result in nextValue . So

nextValue = 2 * 60

nextValue = 120

PrintFactorial( nextCounter,  nextValue);  This statement becomes:  

PrintFactorial(2,120)

4th step:

PrintFactorial method has two base conditions which do not hold because the factCounter is 2 here which is neither 1 nor 0 so the program control moves to the recursive part.  

cout << factCounter << " * ";

In recursive part, the above statement prints the value of factCounter  followed by an asterisk on the output screen. So this prints:

5* 4 * 3 * 2 *

nextCounter = factCounter - 1;

This statement decrements the value of factCounter by 1 and assigns it to nextCounter as:

nextCounter = 2 - 1;

nextCounter = 1

nextValue = nextCounter * factValue;  multiplies the value of nextCounter by factValue and stores result in nextValue . So

nextValue = 1 * 120

nextValue = 120

PrintFactorial( nextCounter,  nextValue);  This statement becomes:  

PrintFactorial(1,120)

Now the base case 2 evaluates to true because nextCounter is 1

cout << factCounter << " = " << factValue  statement prints the value of factCounter i.e. 1 followed by an equal sign = followed by value of factValue i..e 120

So the output of the above program with userVal = 5 is:  

5! = 5 * 4 * 3 * 2 * 1 = 120

Recursion functions are functions whose execution is controlled from within the function

The PrintFactorial()'s recursive case

The code segment written in Python, where comments are used to explain each action is as follows:

#This defines the function

def PrintFactorial(n):

#if n is 1, this returns the value of n

  if n == 1:

      return n

#If otherwise

  else:

#This calculates the factorial, recursively

      return n*PrintFactorial(n-1)

Read more about python programs at:

https://brainly.com/question/16397886

in java how do i Write a program that reads a set of integers, and then prints the sum of the even and odd integers.

Answers

Answer:

Here is the JAVA program:

import java.util.Scanner; //to take input from user

public class Main{

public static void main(String[] args) { //start of main function

Scanner input = new Scanner(System.in); // creates Scanner class object  

       int num, integer, odd = 0, even = 0; //declare variables

       System.out.print("Enter the number of integers: "); //prompts user to enter number of integers

       num = input.nextInt(); //reads value of num from user

       System.out.print("Enter the integers:\n"); //prompts user to enter the integers

       for (int i = 0; i < num; i++) { //iterates through each input integer

           integer = input.nextInt(); // reads each integer value

               if (integer % 2 == 0) //if integer value is completely divisible by 2

                   even += integer; //adds even integers

               else //if integer value is not completely divisible by 2

                   odd += integer;  } //adds odd integers

           System.out.print("Sum of Even Numbers: " + even); //prints the sum of even integers

           System.out.print("\nSum of Odd Numbers: " + odd);//prints the sum of odd integers

           }}

Explanation:

The program is explained in the comments mentioned with each line of the code. I will explain the logic of the program with the help of an example.

Suppose user wants to input 5 integers. So,

num = 5

Suppose the input integers are:

1, 2 , 3, 4, 5

for (int i = 0; i < num; i++)  is a for loop that has a variable i initialized to 0. The condition i<num is true because i=0 and num=5 so 0<5. Hence the statements inside body of loop execute.

At first iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 1

if (integer % 2 == 0) checks if integer is completely divisible by 2. The modulo operator is used which returns the remainder of the division and if this remainder is equal to 0 then it means that the integer is completely divisible by 2 and if the integer is completely divisible by 2 then this means the integer is even. 1%2 returns 1 so this means this condition evaluates to false and the integer is not even. So the else part executes:

odd += integer;   this becomes:

odd = odd + integer

odd = 1

Now the value of i is incremented to 1 so i=1

At second iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 2

if (integer % 2 == 0) checks if integer is completely divisible by 2. 2%2 returns 0 so this means this condition evaluates to true and the integer is even. So

even += integer;   this becomes:

even= even+ integer

even = 2

Now the value of i is incremented to 1 so i=2

At third iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 3

if (integer % 2 == 0) checks if integer is completely divisible by 2. 3%2 returns 1 so this means this condition evaluates to false and the integer is odd. So

odd += integer;   this becomes:

odd= odd + integer

odd= 1 + 3

odd = 4

Now the value of i is incremented to 1 so i=3

At fourth iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 4

if (integer % 2 == 0) checks if integer is completely divisible by 2. 4%2 returns 0 so this means this condition evaluates to true and the integer is even. So

even+= integer;   this becomes:

even = even + integer

even = 2 + 4

even = 6

Now the value of i is incremented to 1 so i=4

At fifth iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 5

if (integer % 2 == 0) checks if integer is completely divisible by 2. 5%2 returns 1 so this means this condition evaluates to false and the integer is odd. So

odd+= integer;   this becomes:

odd= odd+ integer

odd= 4 + 5

odd = 9

Now the value of i is incremented to 1 so i=5

When i=5 then i<num condition evaluate to false so the loop breaks. The next two print statement prints the values of even and odd. So

even = 6

odd = 9

Hence the output is:

Sum of Even Numbers: 6                                                                                                           Sum of Odd Numbers: 9  

Which of the following would not be considered metadata for a spreadsheet file?
A) Read-only attributeB) Calculation inside the fileC) Name of the fileD) Full size

Answers

Answer:

B.

Explanation:

Metadata is a type of data that dispense details of other data. In simple terms, metadata can be defined as information of a file such as file name, attributes, etc.

In excel sheet, metadata works the same and helps to provide information about file name, author name, file size, attributes such as read-only, archieve, hidden, system, location of the file, date and time of creation, modification, or accessed, type of file, etc.

From the given options, the information that is not considered or included in metadata is calculation inside the file. Metadata in excel sheet does not include calculations inside the file. Thus option B is the correct answer

E-mail is the most common distributed application that is widely used across all architectures and vendor platforms.a) trueb) false

Answers

Answer:

A. True.

Explanation:

E-mail is an acronym for electronic mail and it can be defined as an exchange or transmission of computer-based data (messages) from one user to another over a communications network system.

Also, a distributed application refers to a software program that is capable of running on several computer systems and can communicate effectively through a network.

E-mail is the most common distributed application that is widely used across all architectures and vendor platforms because it primarily operates on a client-server model, by providing users with the requested services through the Simple Mail Transfer Protocol (SMTP) using the standard port number of 25.

Write a GUI program that calculates the average of what an employee earns in tips per hour. The program’s window should have Entry (font: Courier New) widgets that let the user enter the number of hours they worked and amount they earned in tips during they time. When a Calculate button is clicked, the program should display the average amount they got paid in tips per hour. Use the following formula: Tips per hour = amount of tips in dollars / hours.

Answers

Answer:

Explanation:

Using Code:

from tkinter import *

#object of Tk class to make GUI

root = Tk()

#creating a canvas to put labels, entries and button

canvas1 = Canvas(root, width = 300, tallness = 200)

canvas1.pack()

#label for number of hours worked

label1 = Label(root, text = "Hours : ", textual style = ('Courier', 10))

canvas1.create_window(80, 50, window = label1)

#entry for number of hours worked

entry1 = Entry(root, textual style = ('Courier', 10))

canvas1.create_window(200, 50, window = entry1)

#label for sum they earned in tips

label2 = Label(root, text = "Tips : ", textual style = ('Courier', 10))

canvas1.create_window(80, 80, window = label2)

#entry for sum they earned in tips

entry2 = Entry(root, text style = ('Courier', 10))

canvas1.create_window(200, 80, window = entry2)

#label for tips every hour

label3 = Label(root, text = "Tips Per Hour : ", textual style = ('Courier', 10))

canvas1.create_window(80, 150, window = label3)

#function to figure tips every hour

def TipsPerHour():

#getting estimation of hour

hours = int(entry1.get())

#getting estimation of tips

tips = int(entry2.get())

#calculating normal sum got paid in tips every hour

normal = tips/hours

#creating a name to show normal

label4 = Label(root, text = "$" + str(average), textual style = ('Courier', 10))

canvas1.create_window(170, 150, window = label4)

#button for compute

calculateButton = Button(root, text = "Compute", textual style = ('Courier', 10), order = TipsPerHour)

canvas1.create_window(170, 110, window = calculateButton)

#mainloop

root.mainloop()

Data_____is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.
a. ubiquity.
b. quality.
c. anomaly.
d. integrity.

Answers

Answer:

d. integrity

Explanation:

Data integrity is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.

Data integrity can be used to describe a state, a process or a function – and is often used as a proxy for “data quality”. Data with “integrity” is said to have a complete or whole structure. Data integrity is imposed within a database when it is designed and is authenticated through the ongoing use of error checking and validation routines. As a simple example, to maintain data integrity numeric columns/cells should not accept alphabetic data.

Which of these file types does not share info in a spreadsheet?
A) CSV
B) Excel
C) PNG
D) all have

Answers

Answer:

C) PNG

Explanation:

PNG which is an acronym for Portable Network Graphics is a form of images file format and it does not share info in a spreadsheet. The files that share info on the spreadsheet are the following:

1. Text = .txt

2. Formatted Text = .prn

3. CSV = .csv

4. Data Interchange Format = .dif

5. Symbolic Link = .slk

6. Web page = .html, .htm

7. XML Spreadsheet = .xml

Hence, in this case, the file types that do not share info in a spreadsheet is PNG

PNG does not share info in a spreadsheet

Comma-separated values (CSV) file is a text file that stores data in lines. Each record is separated by commas and is made up of fields. CSV can store data in tabular forms like spreadsheet or database.

Excel files use a Binary Interchange File Format that store data like numbers, formula and spreadsheet data.

Portable Graphics Format (PNG) is a file format that is used to store images. It does not share info in spreadsheet.

Find about more at: https://brainly.com/question/17351238

Change the value in cell E4 to 375000

Answers

Answer:

Click cell E4. Type 375000, and then press ENTER. Keyboard (2)1. Press SHIFT+TAB (or use ARROW keys) to select cell E4.

Which item converts a high level language program to low level machine instruction?

Answers

The compiler translates each source code instruction into the appropriate machine language instruction, an

In order to place a gradient within a stroked path for type, one must convert the type using the __________

Answers

Answer:

in order to place a gradient within a stroked path for type ,one must convert the type 17316731

Help me pls, thank you

Answers

Answer:

pseudocode

flowchart

Explanation:

Answer:

Pseudo code flowchart

What are video games and what have they meant for society?

Answers

video games are a source of entertainment for people especially children.

it helps relieve stress for adults or grown ups.

society sees video games as a negative impact on children and that it wastes their time.

Answer:

video games are games played for fun and enjoyment they are types of video games we have shooting video games, football video games, sport video games and so much more. video games are for fun and not all video games are meant for society. video games like football should be meant for sociey ehere everyone can come together to play games like these bring people and society together.

The system board contains the logic circuitry that performs the instructions of a computer's applications.a. Trueb. False

Answers

Answer:

TRUE

Explanation:

As computer programs can be complex and difficult to write, they, A Web browser is an example of applications software. process, as well as programs, or instructions specifying the steps necessary to complete.

The statement "The system board contains the logic circuitry that performs the instructions of a computer's applications" is true.

What is a logical symbol?

In Boolean algebra, the conjunction between two propositions is denoted by the logical AND symbol.

It is given that:

The statement is:

The system board contains the logic circuitry that performs the instructions of a computer's applications.

As we know,

An idealized or actual device called a logic gate implements a Boolean function, which is a logical operation on one or more binary inputs that results in a single binary output.

Because writing computer programs can be challenging and complex, An illustration of applications software is a web browser. programs or instructions that outline the steps required to perform a process

Thus, the statement "The system board contains the logic circuitry that performs the instructions of a computer's applications" is true.

Learn more about the logical symbol here:

brainly.com/question/11359207

#SPJ2

11. To select Access database entries, you should be in
O A. Datasheet view.
O B. Design view.
O C. Query wizard.
O D. Form Design.

Answers

Answer: A

Explanation:

Answer:

Design view

Explanation:

did it on edge






select the correct answers. What are examples of real-time applications?

Answers

My answer to the question are:online money transfer,news update,blog post.

Today, trending current events are often present on websites. Which of the following early developments in audiovisual technology is most closely related to this?

Answers

Answer: Newsreels

Explanation:

Options not included however with the early audio visual technologies known, the Newsreel is the closest when it comes to displaying news and current events.

Like the name suggests, Newsreels showed news and they did this of events around the world. They were short films that captured events and then displayed them in cinemas and any other viewing locations capable of showing them.

By this means, people were able to keep up to date with events around the world without having to read newspapers. The advent of news channels killed this industry and logically so.

Answer:

B: Newsreels

Explanation:

edg2021

The text states, "...newsreels began to gain popularity. They were short movies about current events around the world, usually shown prior to the main feature in movie theaters"

________models software in terms similar to those that people use to describe real- world objects.
A) Procedural programming
B) Object-oriented programming
C) Object-oriented design
D) None of the above

Answers

Answer:

The correct answer is C - Object-oriented design.

Explanation:

Object-oriented design defines code or software as objects. These objects represent instances of a real-life situation. For example, an animal class consist of a dog, cat, lion. A dog therefore is n instance of the animal class.

Objects are described as having properties and behaviours. Properties are variables, arrays, sets, maps etc and behaviours are the functions and methods that manipulate these data.

Object-oriented programming is done based on this design.

Other Questions
If E(red) of a given half-cell is more negative than E(red) for a standard hydrogen electrode, the half-cell will: How was the Hippodrome different from the Colosseum? Which are the two most important reasons for continuing education in the healthcare fields?A. Rapidly increasing medical costs and a competitive job marketB. Technological advancement in new discoveries in health care C. Job satisfaction in an unstable economyD. Government requirements and rapid Computerization "Now, Ernesto, you are the man of the family. You will take care of your mother until we are together in Sacramento.How do you say por favor?""Plees.""Right, how do you say cunto es?""Hau-mochee.""How do you say qu hora es, por favor?""Hua-tinees, plees.""Correct."Which effective writing technique is the author mainly using in this excerpt?O expressing feelingsO logical sequencingO interesting dialogueO detailed action 2. Over what time period were the crusades conducted ? A Queensland toad travels 10 m/day. How far will it travel in 5 hours? Can someone please help? You have $100,000 to invest in a portfolio containing Stock X and Stock Y. Your goal is to create a portfolio that has an expected return of 12.7 percent. Stock X has an expected return of 11.4 percent and a beta of 1.25, and Stock Y has an expected return of 8.68 percent and a beta of .85. a. How much money will you invest in Stock Y 2. What is empathy and how does studying history help us develop empathy? What are the two main reasons for variation between organisms of the same species?. A. Adaptation and EnvironmentB. Inheritance and MutationC. Inheritance and EnvironmentD. Genetics and Mutation 4 Three collinear points on the coordinate plane are R(x, y), S(x + 8h, y + 8k), andP(+ + 6h,y + 6K)RPPart A: Determine the value ofSPRPPart B: Determine the value ofPlease show the step you took to find the answer In 35 sentences, describe how technology helps business professionals to be more efficient. What is the ones digit in the number 3^20997 Need help ASAP! What geographical feature is prominet in the central region of North America? A.)Broadlead forest B.)Rugged mountain ranges C.)Grassland D.)Desert What does Lease believe is needed to rescue the"deserving poor" from poverty?new lawsindependent partieshonest people How Is the heart different from the other muscles in yourbody? In an enterprise resource planning (ERP) system, the _____ component provides information on production costs and pricing. Please answer 2 and below photo is above and show workthank you There are other equally good substitutes for exercise. True False (4p + 5)(p + 1) = 0