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
emmainna [20.7K]
3 years ago
14

The following code is intended to test if x is NOT less than 17. Fill in the correct symbol:

Computers and Technology
2 answers:
cestrela7 [59]3 years ago
7 0

Answer:

if(x>17): This will check whether the given value of ‘x’ is greater than 17. Suppose if you want to include 17 also then you must write if(x>=17).

Explanation:

hodyreva [135]3 years ago
6 0

There are “two ways” where you can fill the necessary symbol.

Method 1:

if(x>17): This will check whether the given value of ‘x’ is greater than 17. Suppose if you want to include 17 also then you must write if(x>=17).

Method 2:

if(!(x<17)): This conditional statement checks whether the value of x is not less than 15. We use both “comparison operator” and a “not operator” to achieve the given statement through programming constructs.

Here the trick is that, we place a false statement (x<17) and then invert that value to get the desired condition.

You might be interested in
Copy the countdown function from Section 5.8 of your textbook. def countdown(n): if n &lt;= 0: print('Blastoff!') else: print(n)
Lapatulllka [165]

Answer:

def countdown(n):

   if n <= 0:

       print('Blastoff!')

   else:

       print(n)

       countdown(n-1)

       

def countup(n):

   if n >= 0:

       print('Blastoff!')

   else:

       print(n)

       countup(n+1)

number = int(input("Enter a number: "))

if number >= 0:

   countdown(number)

elif number < 0:

   countup(number)

<u>Outputs:</u>

Enter a number: 3                                                                                                              

3                                                                                                                              

2                                                                                                                              

1                                                                                                                              

Blastoff!

Enter a number: -3                                                                                                              

-3                                                                                                                              

-2                                                                                                                              

-1                                                                                                                              

Blastoff!

Enter a number: 0

Blastoff!

For the input of zero, the countdown function is called.

Explanation:

Copy the countdown function

Create a function called countup that takes one parameter, n. The function counts up from n to 0. It will print the numbers from n to -1 and when it reaches 0, it will print "Blastoff!".

Ask the user to enter a number

Check if the number is greater than or equal to 0. If it is, call the countdown function. Otherwise, call the countup function.

4 0
2 years ago
On a digital clock the displayed time changes constantly (True or False)
Vlada [557]
The answer is true as it will change on its own
8 0
3 years ago
Online library catalogs can direct you to your closest library. (1 point)<br> True<br> False
Kitty [74]

Answer:

True

Explanation:

8 0
3 years ago
which tool in administrative tools should you open if you want to view messages to troubleshoot errors? a. resource monitor b. e
VikaD [51]

A tool in administrative tools which you should open if you want to view messages to troubleshoot errors is an: b. event viewer.

<h3>What is an operating system?</h3>

An operating system (OS) can be defined as a system software that's usually pre-installed on a computing device by the manufacturers, so as to manage random access memory (RAM), software programs, computer hardware and all user processes.

<h3>What is an event viewer?</h3>

An event viewer can be defined as an administrative tool that is found in all versions of Windows Operating System (OS) which is designed and developed to enable administrators and end users in viewing the event logs of software application and system messages such as errors on a local or remote machine.

In this context, we can reasonably infer and logically deduce that an event viewer is a tool in administrative tools which you should open if you want to view messages to troubleshoot errors.

Read more on event viewer here: brainly.com/question/14166392

#SPJ1

4 0
1 year ago
Greedy Algorithm Design
Alik [6]

Answer:

The algorithm is as follows:

1. Start

2. Get the number of items (n)

3. Get the current price of the n items (a1, a2..... an)

4. Get the possible hiked price of the n items (b1, b2..... bn)

5. Calculate the difference between the current and hiked prices for each item i.e. d_i = b_i - a_i

6. Sort the differences in descending order (i.e. from the greatest to the least)

7. Buy items in this order of difference

8. Stop

Explanation:

The algorithm is self-explanatory; however, what it does is that:

It takes a list of the current price of items (say list a)

E.g: a = [100, 150, 160]

Then take a list of the hiked price of the items (say list b)

E.g: b = [110, 180, 165]

Next, it calculates the difference (d) between corresponding prices d_i = b_i - a_i

d = [(110 - 100),(180-150),(165-160)]

d = [10,30,5]

Sort the difference from greatest to lowest (as the difference is sorted, lists a and b are also sorted)

d = [30,10,5]

a = [150, 100, 160]

b = [180, 110, 165]

If there is no hike up to item k, the couple would have saved (i = 1 to d[k-1])

Assume k = 3

The couple would have saved for 2 item

Savings = d[1] + d[2]

Savings = 30 +10

Savings = 40

The saved amount will then be added to the kth item in list a i.e. a[k](in this case k = 3) in order to buy b[k]

Using the assumed value of k

a[k] = a[3]

a[3] = 160

b[3] = 165

Add the saved amount (40) to a[3]

New\ Amount = 40 + 160

New\ Amount = 200

This new amount can then be used to buy b[3] i.e. 165, then they save the change for subsequent items

8 0
3 years ago
Other questions:
  • While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes
    7·1 answer
  • The eastern front was longer than other fronts of the war true or false
    7·2 answers
  • What is our goal for a hashing function?
    14·2 answers
  • If a computer is capable only of manipulating and storing integers, what di themselves? How are these difficulties overcome
    13·1 answer
  • What did I do wrong? May you please correct it for me...I was also looking on how to delay when it prints. Like when it prints a
    9·1 answer
  • (5 points) Create a user-defined data structure (i.e., struct) called Point that represents a two-dimensional Cartesian coordina
    5·1 answer
  • How many pounds must a sand bag weigh to test if a safety net can absorb the proper amount of force? A. 150 lbs. B. 200 lbs. C.
    6·1 answer
  • Frrrrrrrrrrreeeeeeeeee brainliest for u
    13·2 answers
  • a matched-pairs t-test is not an appropriate way to analyze data consisting of which of the following?
    11·1 answer
  • What does Amara hope will<br> happen when Dad sits on the sofa?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!