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
Vilka [71]
3 years ago
13

Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every

number from 1 to n (inclusive) that is a multiple of 6 or a multiple of 11. Do not use a helper function.
Computers and Technology
1 answer:
aivan3 [116]3 years ago
3 0

Answer:

def first_a(n):

   lst1 =[x for x in range(1,n+1)if x%6==0 or x%11 ==0]

   print(lst1)

Explanation:

Above is a function in python programming language. We have used list comprehension to check numbers that are multiples of 6 or 11 in a range.

When this function is called it will receive an argument (n) of type integer, a range will then be generated from 1 to n+1 since n is inclusive. The modulo operator is used to determine is a value is a multiple of 6 or 11, since their multiples will evaluate to 0

You might be interested in
Why is it important to recognize the proper boundaries or limits of algorithms?
Oduvanchick [21]

Answer:

D

Explanation:

DDDD no war\t

4 0
3 years ago
Where can I find answer key for electrician systems based on NEC 2017
lisov135 [29]

google or search through pvps

6 0
3 years ago
Which is an example of the operation of a game?
SVEN [57.7K]

Answer:

D.  

The player uses a joystick to control the character.

Explanation:

The MEANING of operation is: "The fact or condition of functioning or being active."

This explains that the answer is D because you are using the joystick to control the character. Hope the helps.

6 0
3 years ago
Read 2 more answers
wo non-negative integers x and y are equal if either: Both are 0, or x-1 and y-1 are equal Write a function named equals that re
Mrac [35]

Answer:

Using python programming language.

Explanation:

#to define the function write as below

def equal():

    #to get the two integers from the user

#The user is asked for input in the code below.

x = int(input("Enter the value for X"))

y= int(input("Enter the value for y"))

if x==0 and y==0:

    print("both numbers are ", "0")

elif: x==1 and y==1:  #This test if both x and y are 1

    print("true")

elif: x==y: #this line test if both values are equal

    print("true")

else:

    print("False")

equal()  #end of the function

3 0
3 years ago
Which occurs during market equilibrium? Check all that apply
e-lub [12.9K]

Answer:

Explanation:

You do not have options please be more in depth it would help me with your question.

4 0
3 years ago
Other questions:
  • 7.8.1: Function pass by reference: Transforming coordinates. Define a function CoordTransform() that transforms the function's f
    6·1 answer
  • In the file MajorSalary, data have been collected from 111 College of Business graduates on their monthly starting salaries. The
    15·1 answer
  • The phrase has become an Internet buzz word. It refers to a top-level domain name for communications organizations.TrueFalse
    12·1 answer
  • The while loop is a pre-test loop? TRUE OR FALSE
    9·2 answers
  • The part of the poppet valve that contacts the valve seat is called the?
    10·2 answers
  • How do you put a picture when you ask a question?
    6·2 answers
  • Who developed the idea of a universal network?
    11·1 answer
  • I need help I have questions I need answers in coding html,css,js and python.Fast
    7·1 answer
  • The computer virus is simply a.......... a. diseases b.set of computer instrustruction or code c. types of bacteria​
    9·1 answer
  • What is the output from main (below) after the following function is called. void calculateCost(int count, double& subTotal,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!