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
denis23 [38]
3 years ago
11

Consider the following code segments, which are each intended to convert grades from a 100-point scale to a 4 point scale and pr

int the result. A grade of 90 or above should yield a 4.0, a grade of 80 to 89 should yield a 3.0, grade of 70 to 79 should yield a 20, and any grade lower than 70 should yield a 0.0 Assume that grade is an int variable that has been properly declared and initialized Code Segmenti double points = 0.0; ir (grade > 89) points 4.0; else if (grade > 79) points + 3.0; else if (grade > 69) points += 2.0; else points + 0.0; System.out.println (points); Code Segment II double points - 0.0; if (grade > 89) points + 4.0; if (grade > 79) grade 3.0; if (grade > 69) points - 2.0; if (grade points + 0.01 System.out.println (points); Which of the following statements correctly compares the values printed by the two methods? A. The two code segments print the same value only when grade is below 80. B. The two code segments print the same value only when grade is 90 or above or grade is below 80. C. The two code segments print the same value only when grade is 90 or above. D. Both code segments print the same value for all possible values of grade E. The two code segments print different values for all possible values of grade.
Computers and Technology
1 answer:
zhuklara [117]3 years ago
8 0

Answer:

A. The two code segments print the same value only when the grade is below 80.

Explanation:

The first code segment defines a nested if-else statement with the different grade categories to compare and print and would only print one value for a given grade range. The second code segment defines several if statements for each grade range and can add multiple values to the points variable for one grade range that meets the condition.

Both code segments would only print out the same values of points for a grade range below 80.

You might be interested in
The two major factors that impact processor speed or clock speed and _____ .
SashulF [63]
Number of cores/threads.
5 0
3 years ago
________ take computers with wireless connections through an area and search for unprotected wireless networks, and then monitor
KengaRu [80]

Answer:

The correct answer for the following question will be C. War driver.

Explanation:

The act of searching for network (wireless) in a moving vehicle by a person (using laptop and mobile phones) is known as War driver. We can also call it a free WiFi access point publicly.

The other three options like :

  • Key loggers (basically a software).
  • Pretexter (used for scam, getting someones personal information).
  • Phishers (used to obtain users sensitive information such as, username, password etc).

None of the option is used for networking, not able to perform such types of tasks as war driver.

So, option C is the correct answer.

3 0
3 years ago
Editing and sorting the data file are steps performed during the ________ stage in the data processing cycle
yawa3891 [41]
<span>Editing and sorting the data file are steps performed during the data preparation stage in the data processing cycle.</span>
5 0
3 years ago
What tool do you use to secure remote access by users who utilize the internet??
madam [21]
The tool that you use to secure remote access by users is VPN
3 0
3 years ago
If you wanted readers to know a document was confidential, you could include a ____ behind the text stating
Maksim231197 [3]
I have no idea for that
4 0
3 years ago
Read 2 more answers
Other questions:
  • An administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on all interfaces on the server
    12·1 answer
  • A species of snake lives in a rainforest. Which would be an adaptation for this
    10·2 answers
  • Thumbnails in the picture gallery display the more common color saturation, color tone, and recolor adjustments. true or false.
    12·1 answer
  • who will follow me on tiktok and like all my videos? if you do ill give branlist and give u a shoutout and you can enter my big
    15·1 answer
  • PLEASE HELPP!!!!!
    14·1 answer
  • Which statement best describes the refraction of light
    9·1 answer
  • Antwon is building his technical writing portfolio.He created the following checklist: •check whether any part of the portfolio
    11·1 answer
  • Please help I’ll mark brainliest!
    12·2 answers
  • If you play video games, please answer these questions it’s for a survey for my game development class!!
    5·1 answer
  • Which format has the largest file size?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!