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
Ket [755]
2 years ago
13

The average American has 10 devices, ask for users average number of devices. Any number between 7 and 12 will print “you have a

n average number of devices” but if it beyond the range it will print “you’re beyond the average range”
Computers and Technology
1 answer:
Juli2301 [7.4K]2 years ago
5 0

This is for Python

device_num = int(input('How many devices do you have: '))

if device_num >= 7 and device_num <= 12:

   print('You have an average number of devices')

if device_num > 12:

   print("You're beyond the average range")

You might be interested in
Input 3 positive integers from the terminal, determine if tlrey are valid sides of a triangle. If the sides do form a valid tria
butalik [34]

Answer:

In Python:

side1 = float(input("Side 1: "))

side2 = float(input("Side 2: "))

side3 = float(input("Side 3: "))

if side1>0 and side2>0 and side3>0:

   if side1+side2>=side3 and side2+side3>=side1 and side3+side1>=side2:

       if side1 == side2 == side3:

           print("Equilateral Triangle")

       elif side1 == side2 or side1 == side3 or side2 == side3:

           print("Isosceles Triangle")

       else:

           print("Scalene Triangle")

   else:

       print("Invalid Triangle")

else:

   print("Invalid Triangle")

Explanation:

The next three lines get the input of the sides of the triangle

<em>side1 = float(input("Side 1: ")) </em>

<em>side2 = float(input("Side 2: ")) </em>

<em>side3 = float(input("Side 3: ")) </em>

If all sides are positive

if side1>0 and side2>0 and side3>0:

Check if the sides are valid using the following condition

   if side1+side2>=side3 and side2+side3>=side1 and side3+side1>=side2:

Check if the triangle is equilateral

<em>        if side1 == side2 == side3: </em>

<em>            print("Equilateral Triangle") </em>

Check if the triangle is isosceles

<em>        elif side1 == side2 or side1 == side3 or side2 == side3: </em>

<em>            print("Isosceles Triangle") </em>

Otherwise, it is scalene

<em>        else: </em>

<em>            print("Scalene Triangle") </em>

Print invalid, if the sides do not make a valid triangle

<em>    else: </em>

<em>        print("Invalid Triangle") </em>

Print invalid, if the any of the sides are negative

<em>else: </em>

<em>    print("Invalid Triangle")</em>

4 0
2 years ago
What are some of the general components of an IDE?
AysviL [449]

Answer:

An IDE normally consists of a source e editor, build automation tools. Most modern IDEs have intelligent code completion. Some IDEs contain a compiler, interpreter, or both.

5 0
3 years ago
Assume that the final grade for a course is determined based on this scale - A: 900 points, B: 800-899 points, C: 700-799 points
saul85 [17]

Answer:

In Python:

def get_letter_grade(points):

   if points>=900:

       grade ="A"

   elif points>=800 and points < 900:

       grade ="B"

   elif points>=700 and points < 800:

       grade ="C"

   elif points>=600 and points < 700:

       grade ="D"

   else:

       grade = "F"

   return grade

Explanation:

This defines the function

def get_letter_grade(points):

The following if-else if conditions check the score to determine the appropriate grade

<em>    if points>=900:</em>

<em>        grade ="A"</em>

<em>    elif points>=800 and points < 900:</em>

<em>        grade ="B"</em>

<em>    elif points>=700 and points < 800:</em>

<em>        grade ="C"</em>

<em>    elif points>=600 and points < 700:</em>

<em>        grade ="D"</em>

<em>    else:</em>

<em>        grade = "F"</em>

This returns the grade

   return grade

5 0
2 years ago
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. He wants to get a low-level angle of the de
daser333 [38]

i believe that the answer to this question is c


8 0
2 years ago
Read 2 more answers
Assign total_owls with the sum of num_owls_A and num_owls_B.
zavuch27 [327]

To debug a code, means that we locate and fix the errors in a code.

The issue with your code is that:

<em>You did not convert num_owls_A and num_owls_B to integers, when adding them together.</em>

The fix to this is that:

<em>You need to convert num_owls_A and num_owls_B to integers, when adding them together.</em>

The fix is as follows:

<em>total_owls = int(num_owls_A) + int(num_owls_B)</em>

The updated code is as follows:

<em>total_owls = 0 </em>

<em>num_owls_A = input() </em>

<em>num_owls_B = input() </em>

<em>total_owls = int(num_owls_A) + int(num_owls_B) </em>

<em>print('Number of owls:', total_owls)</em>

<em />

<em>The above code will perform addition operations for all inputs</em>

Read more about Python programs at:

brainly.com/question/13246781

8 0
2 years ago
Other questions:
  • A firewall is either software or dedicated hardware that exists between the __________ being protected.
    13·1 answer
  • The family size bottle of sunscreen holds 121212 fluid ounces (\text{fl oz})(fl oz)(, start text, f, l, space, o, z, end text, )
    12·1 answer
  • The physical part or components of a computer system called​
    5·2 answers
  • What do I do if my friend wants me to watch a video at my house?
    8·2 answers
  • 1. Which sentence best expresses the main idea
    12·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • Primary functions of lighting are sufficient light to...
    13·1 answer
  • If a person communicates indirectly and attaches little value to
    6·1 answer
  • Which describes the Paradox of Automation?
    5·2 answers
  • When conducting memory and recall tests, some people make an effort to normalize memories by not reporting extreme cases. this l
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!