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]
4 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]4 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
You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudo
Alecsey [184]

Answer:

The correct answer to the following question:

while sub < SIZE AND foundIt = "N"

Explanation:

Firstly, we start the pseudocode after that set the variable sub to 0 and size to 1 of num type and also set a num type array VALID_ITEM[5] and its elements are 27,53,84,89,95.

Than set string type variable foundIt to "N", then we set a while loop and correct its condition is "< SIZE AND foundIt = "N" ".

Than starts if condition which is "item = VALID_ITEM[sub]", if the condition is true than foundIt = "Y", after that endif.

Than increment the variable sub, after that endwhile, after this, we start if condition which is "foundIt = "Y" " if the condition is true then output "Valid item number" or else "Invalid item number", and then we endif and after all stop the pseudocode.

8 0
4 years ago
Judy is searching for files with a .jpg file extension on her laptop. Which type of file is she looking for?
nikklg [1K]
<span>JPEG files </span><span> are a common file format for digital photos and other digital graphics so she would be looking for a picture

</span>
6 0
3 years ago
Read 2 more answers
Which statement relating to a Works Cited page is NOT True?
oksano4ka [1.4K]
The incorrect answer is the second one: It is the first page in a research paper.
Works cited pages always come last.
7 0
4 years ago
Read 2 more answers
Complete the following statements by choosing the correct answer from the drop-down menus.
LUCKY_DIMON [66]

Answer:

1) control panel

2) WYSIWYG HTML

3) website directory

4)website directory

Explanation:

In the website host’s <u>control panel</u>, there is a set of tools for organizing the website.

A <u>WYSIWYG HTML</u> editor lets the website creator type directly into the web pages or specific fields without knowing HTML code.

All website files need to reside in the  <u>website directory.</u>

The <u>website directory</u> is where all of the content will be stored.

<u>OAmalOHopeO</u>

7 0
3 years ago
30 POINTS!!
bulgar [2K]

Answer:

online

the answer is online

7 0
3 years ago
Other questions:
  • Plz help! 3 questions! 1.The ideal light to use is.... A.front light B.a combination of side and back light C.a combination of f
    10·1 answer
  • Write a complete program whose class name is hello and that displays hello, world on the screen.
    13·2 answers
  • What is the decimal equivalent of the largest binary integer that can be obtained with
    9·1 answer
  • ____ is scientifically seeking and discovering facts.
    9·1 answer
  • Impact of computer in society, using relevant examples​
    13·1 answer
  • PLS HELP For this activity, you can use the audio recorder on your cell phone or a digital camera to record the following sounds
    14·1 answer
  • Which examples demonstrate common qualifications for Marketing Information Management and Research careers? Check all that apply
    9·2 answers
  • How am I supposed to delete my Brainly account if I don't know my password and my E-mail is made up?
    13·2 answers
  • (I'm confused, might as well ask for help)
    8·2 answers
  • An embedded system describes computing technology that has been enclosed in protective shielding for security reasons. True or f
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!