One advantage of using an electric car would be not having to pay for gas, one risk would be it malfunctioning.
B. False! Opinions are based on what people feel about something.
Answer:
Following are the code to this question:
def rate_animal(an_animal):#defining method rate_animal
if an_animal=="cat":#defining if block to check valu
return 1 #return value 1
elif an_animal=="dog":# defining elif block to check another value
return 2 #return value 2
elif an_animal=="capybara":# defining elif block to check another value
return 3 #return value 3
elif an_animal=="danger noodle":# defining elif block to check another value
return 4 #return value 4
else:
return -1 #return value -1
print("dog Rating: ",rate_animal("dog"))#calling method and print its return value
print("cat Rating: ",rate_animal("cat"))#calling method and print its return value
print("capybara Rating: ",rate_animal("capybara"))#calling method and print its return value
print("danger noodle Rating: ",rate_animal("danger noodle"))#calling method and print its return value
print("Horse Rating: ",rate_animal("horse"))#calling method and print its return value
Output:
dog Rating: 2
cat Rating: 1
capybara Rating: 3
danger noodle Rating: 4
Horse Rating: -1
Explanation:
Description of the python code can be defined as follows:
- In the above program code, a method "rate_animal" is declared, in which a string variable "an_animal" passes as the argument, inside the method, multiple conditional statements are used.
- In the if the block, it will check string value if it equal to "cat", it will return 1, otherwise, it will go to elif block, in this block it will check value is "dog", "capybara", and "danger noodle", if the value is any of then it will return 2, 3, and 4.
- If the above condition is not true, it will return a value, that is "-1", in the next step print method is used, that calls the method and print its return value.
I might be able to do this but I'd have to just send you the python code for you to run on your own.
Also, what should the distance be in?
I can get it to you in an hour.
Answer/Explanation:
The role of memory in a computer system is to remember the date you have searched on it or websites you've visited or photos you've taken. This is called the memory drive. Memory drives are very important imagine spending your whole life on this video game and you finally finished your game! Well without the memory drive you'd have to start that game all over again.
Because of the memory drive we can save our data in our devices. Memory drive is used in every device that we use in modern day. Memory drives are important for computers to work properly. Did you know the reason we have fans or holes in the bottom of our computer is to cool the drives down in our computer?
It's because they get overheated cause they work on your computer constantly. Computers are very complex and high tech so it helps to make things into small drives. Memory is important for the survival of tech, computers. We use memory every day in different ways wether its our computers or our devices or our heads.
<u><em>~ LadyBrain</em></u>