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
ankoles [38]
3 years ago
13

Atheel tests a program and gets a NameError. How can this be fixed?

Computers and Technology
2 answers:
kondaur [170]3 years ago
8 0

<u>Answer:</u>

B = Create a variable

Explanation:

First off to understand this question, you need to understand what a NameError is. A NameError is when a function or variable isn't valid, or is not defined. So what you need to do it make a variable that is valid/defined. Therefore the answer is B create a variable

I hope this helps!

Oksana_A [137]3 years ago
7 0

Answer:

You can't call a function unless you've already defined it. Move the def createDirs(): block up to the top of your file, below the imports.

Explanation:

Some languages allow you to use functions before defining them. For example, javascript calls this "hoisting". But Python is not one of those languages.

You might be interested in
In microsoft word, when you highlight existing text you want to replace you are
RSB [31]
You are changing the word
8 0
2 years ago
Given the list of customer segments below please create a new list of the names of the segments only using(a) a for loop(b) a li
Alchen [17]

Answer:

new_segment = [ ]

for segment in segments:

   new_segment.append({'name': segment, 'average_spend': money})

print( new_segment)

Using list comprehension:

new_segment =[{'name': segment, 'average_spend': money}  for segment in segments]

Using map():

def listing(a):

   contain =  {'name': segment, 'average_spend': money}

   return contain

new_segment = [ ]

new_segment.append(map( listing, segment))

print(list(new_segment)

Explanation:

The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .

7 0
3 years ago
6. Consider a circle of diameter d cm.
blagie [28]

Circles

Area of Circle is \pi d^{2} /4

Total percentage increase in the area of the modified circle is 69%

Explanation:

(a)  Given the diameter of the circle be d

Then the radius of the circle = r = d/2

and the area of the circle is given by:

 

Area(A) = \pi r^{2}  

A = \pi (d/2)^{2}

A = \pi d^{2} /4

The area of circle is \pi d^{2} /4

(b)

The increase in percentage while changing the dimensions is given by the formula  :

Total % increase = a% + b% - (a% * b%)/100

Where ,

a% is the percentage increase in side a

b% is the percentage increase  in side b

Let the percentage increase in radius is : a%

Since a% = b%

So the formula is

Total increase % = a% + a% + (a% * a%)/100

Given here the diameter of the circle increases by 30% so a =30

Therefore, putting the value of a in the formula

Total increase % = 30% + 30% + (30% *30%)/100

Total increase % = 60% + 9%

Total increase % =69%

Therefore the total percentage increase in the area of the modified circle is 69%

8 0
3 years ago
Which save as element allows a user to save a presentation on a computer?
s344n2d4d5 [400]

Answer:

This PC

Explanation:

Got it right

7 0
3 years ago
Read 2 more answers
Need help this is for my technology class. We are doing a city research paper but it’s the rough draft and I’m doing la. But I c
serious [3.7K]
One business is " Backwards Beekeepers," Your welcome. >,<
5 0
3 years ago
Read 2 more answers
Other questions:
  • • Describe the steps in detail that the operating system performs to handle interrupts, including ISRs, the stack, and hardware?
    5·1 answer
  • Why should you log out when you finish an online session?
    9·1 answer
  • Using Task Manager, you discover an unwanted program that is launched at startup. Of the following items, which ones might lead
    7·1 answer
  • Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValN
    7·2 answers
  • Drag each tile to the correct box.
    11·1 answer
  • AYUDAAAA!!!!! URGENTE!!!!!!1<br> ¿para que sirve la "BIG DATA"?
    9·1 answer
  • Which file extension indicates a text document? .ppt .tst .pdf .txt
    14·2 answers
  • Where does change management play a major role in transforming a client
    11·1 answer
  • Plsss help me<br>give two examples of problems that can occur when sytems do not work properly​
    9·1 answer
  • Sample outputs with inputs 9 5 2 -1 in python.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!