1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DedPeter [7]
3 years ago
5

Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. Fo

r example, your code may look something like this:car = 'subaru'print("Is car == 'subaru'? I predict True.")print(car == 'subaru')print("\nIs car == 'audi'? I predict False.")print(car == 'audi')Create at least 4 tests. Have at least 2 tests evaluate to True and another 2 tests evaluate to False.
Computers and Technology
1 answer:
N76 [4]3 years ago
7 0

Answer:

this:name = 'John'

print("Is name == 'John'? I predict True.")

print(name == 'John')

print("\nIs name == 'Joy'? I predict False.")

print(car == 'Joy')

this:age = '28'

print("Is age == '28'? I predict True.")

print(age == '28')

print("\nIs age == '27'? I predict False.")

print(age == '27')

this:sex = 'Male'

print("Is sex == 'Female'? I predict True.")

print(sex == 'Female')

print("\nIs sex == 'Female'? I predict False.")

print(sex == 'Joy')

this:level = 'College'

print("Is level == 'High School'? I predict True.")

print(level == 'High School')

print("\nIs level == 'College'? I predict False.")

print(age == 'College')

Conditions 1 and 2 test for name and age

Both conditions are true

Hence, true values are returned

Conditions 3 and 4 tests for sex and level

Both conditions are false

Hence, false values are returned.

You might be interested in
Write down the steps that you will take to organize your files
Grace [21]

I don't have much context but I will try my best to answer your question.

To organize files, you would need to create Folders and Subfolders, these will keep your files in their respectful places as long as you continue to move the files to those respected folders.

3 0
3 years ago
Read 2 more answers
In some cases, certain Hyper-V guest operating system features do not function properly using the operating system's own device
klasskru [66]

Answer:

The correct answer to the following question will be "Guest Integration Service".

Explanation:

Integration resources are often a packaged package of applications that enhances connectivity between the hosting network as well as the virtual device when enabled throughout the VM.

  • This also seamlessly integrates time between both the visitors and server OS and could provide a pulse and folder compatibility.
  • It offers a Hyper-V network interface for unidirectional copying of data from and to another virtual machine.

This package of tools will help to fix compatibility problems. So, that is the right answer.

8 0
3 years ago
A bastion host allows the firewall to connect to the internal network and the perimeter network.TrueFalse
Delicious77 [7]

Answer: True

Explanation:

 Yes, the given statement is true, as the bastion host basically require two individual firewall that connect with the internal network and perimeter network by using the perimeter configuration.

Perimeter network basically isolate the the bastion host from the internal network. Bastion host is the serve as the host that connect with the external world. As, perimeter network is one of the type of the firewall network system.

Therefore, the internal network and the perimeter network basically connect with the firewall by using bastion host.

3 0
3 years ago
Write a program, NumberStatistics.java, that reads an unspecified number of integers. The program ends with the input 0. The pro
Lerok [7]

Answer:

Following are the program, which can be below:

import java.util.*; //defining header file

public class NumberStatistics  //defining class NumberStatistics

{

public static void main(String[] arc) //defining main method

{

int total_number=0,max_val=0,min_val=0,neg_val=0,pos_val=0,neg_count=0,pos_count=0,x; //defining variables

Scanner ox= new Scanner(System.in); //creating Scanner class Object

System.out.println("Enter positive and negative value with sign and when complete inter 0:"); //print message  

x= ox.nextInt(); //input value from user

while(x!=0) //defining loop to check input value is 0

{

total_number++; // increment value

if(total_number == 1)  //defining conditional statement to check minimum and maximum value

{

max_val = x; //assign value in max  

min_val = x;//assign value in min

}

else  //defining else block

{

if(max_val < x) //check maximum value

{

max_val = x; //assign maximum value

}

if(min_val > x) //check minimum value

{

min_val = x; //assign minimum value

}

}

if(x > 0) //input values  

{

pos_count++; //count positive value

pos_val+=x; // add positive values

}

else  

{

neg_count++;//count negative value

neg_val+=x; // add negative values

}

x = ox.nextInt(); //input values

}

// defining conditionl statement

if(total_number != 0)  // defining if block to print all value

{

System.out.println("positive value average= "+(pos_val/(double)pos_count));

System.out.println("negative values Average= "+(neg_val/(double)neg_count));

System.out.println("all values average= "+(pos_val+neg_val)/(double)total_number);

System.out.println("maximum value = "+max_val+"\n"+" minimum value = "+min_val);

}

else  

{

System.out.println("no positive values found");

System.out.println("no negative values found");

}

}

}

Output:

Enter positive and negative value with sign and when complete inter 0:

12

8

04

22

-22

-5

9

0

positive value average= 11.0

negative values Average= -13.5

all values average= 4.0

maximum value = 22

minimum value = -22

Explanation:

The Description of the above java program can be described as follows:

  • In the above code first we import the package for user input, then defines the variable "total_number,max_val,min_val,neg_val,pos_val,neg_count, pos_count,x" to store the value prints its value.
  • In the next step, a scanner class object is created for user input and defines a while loop, that checks input value isn't equal to 0, inside the loop a conditional statement defines that cont and calculates all positive, negative, and all values addition.
  • At the another conditional statement is defines, that prints all value average, and also prints maximum, minimum value.
6 0
4 years ago
Who share the road with an impaired driver are at risk
bonufazy [111]
All drivers

All drivers who share the road with an impaired driver are at risk.
8 0
3 years ago
Read 2 more answers
Other questions:
  • What is life all about?
    15·2 answers
  • The HR department of a company wants to send out an email informing its employees about an upcoming social event. Which email ap
    11·2 answers
  • assume that you want to sort an array have 100000 elements which algorithm (insert sort algorithm or quick sort algorithm) is th
    12·1 answer
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • Who is gossip girl.....
    8·2 answers
  • What is the awnser ?
    11·1 answer
  • Use the dropdown menus to complete the sentences about Live Preview and the Mini Toolbar Live Preview is a convenient way to see
    15·2 answers
  • How does natural gas move through pipelines from the well head to the end user thousands of miles away
    5·1 answer
  • Why is computer called information processing machine ?????​
    6·2 answers
  • Which of the following is classified as a workgroup information system?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!