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
Hoochie [10]
3 years ago
15

Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied

by 1.5. That is, the list will contain the values 1.5, 3.0, 4.5, etc. through 15.0. Assign the new list to the variable nums.
Computers and Technology
1 answer:
Alexeev081 [22]3 years ago
8 0

nums = [x*1.5 for x in range(1,11)]

print(nums)

The first line is the list comprehension and the second prints the list to the screen so you can see that it works.

You might be interested in
What type of code do computers typically use to operate? A. CSS B. HTML 5 C. HTML D. Binary
Rufina [12.5K]

Answer:

Pretty Sure its Binary

Explanation:

HTML is used for websites.

4 0
3 years ago
Read 2 more answers
Write a program that prompts the user to enter an equation in the form of 10 5, or 10-5, or 1*5, or 13/4, or 13%4. The program s
grandymaker [24]

Answer:

  1. equation = input("Enter an equation: ")
  2. if("+" in equation):
  3.    operands = equation.split("+")
  4.    result = int(operands [0]) + int(operands[1])
  5.    print(operands[0] + "+" + operands[1] + "=" + str(result))
  6. elif("-" in equation):
  7.    operands = equation.split("-")
  8.    result= int(operands [0]) - int(operands[1])
  9.    print(operands[0] + "-" + operands[1] + "=" + str(result))  
  10. elif("*" in equation):
  11.    operands = equation.split("*")
  12.    result = int(operands [0]) * int(operands[1])
  13.    print(operands[0] + "*" + operands[1] + "=" + str(result))  
  14. elif("/" in equation):
  15.    operands = equation.split("/")
  16.    result = int(operands [0]) / int(operands[1])
  17.    print(operands[0] + "/" + operands[1] + "=" + str(result))  
  18. elif("%" in equation):
  19.    operands = equation.split("%")
  20.    result = int(operands [0]) % int(operands[1])
  21.    print(operands[0] + "%" + operands[1] + "=" + str(result))

Explanation:

The solution code is written in Python 3.

Firstly prompt user to enter an equation using input function (Line 1).

Create if-else if statements to check if operator "+", "-", "*", "/" and "%" exist in the input equation. If "+" is found (Line 3), use split method to get the individual operands from the equation by using "+" as separator (Line 5). Output the equation as required by the question using string concatenation method (Line 6).  The similar process is repeated for the rest of else if blocks (Line 7 - 22).  

5 0
3 years ago
Which example illustrates the idea of "collecting data"?
ivolga24 [154]

Answer:

A. mining all product reviews from an online store for further processing.

Explanation:

5 0
3 years ago
Read 2 more answers
Prompt
madam [21]

Have you ever tried to learn a new language or do you have friends who've had that experience?

Yes, I tried to learn Python and I even managed to do two Discord bots which are (somewhat) functional, but I'm far to say that I've managed to lean the language completly. There are lots of things to learn on a language as Python.

I also leant PHP on my own and managed to do a website (somehow) functional.

What are some of the  steps you would take to learn a new language, and what are some challenges that might arise?

The first steps in learning any computer language is learning the syntax. If you manage to do that, with the experience you gained from previous projects/languages you might be able to create something working. At times you might feel down if the project doesn't work as expected.

What are some things that  can help make the process easier?

Video tutorials, experiments and searching questions and problems on Google is a very important resource.

3 0
2 years ago
The ________ simulates your work area.
xz_007 [3.2K]
I believe it is, A. taskbar
5 0
3 years ago
Other questions:
  • Consider the pseudo-cpu discussed in class. the instruction format is 16 bits, which is subdivided into 4-bit opcode field and 1
    14·1 answer
  • What are words with the root gest?
    15·1 answer
  • What's the best option if you can't show your PowerPoint presentation at all? A. Create PDF/XPS Document B. Prepare a Package Pr
    11·2 answers
  • Use the _______ command to combine the selected cells and center them. merge across center across selection merge cells merge an
    7·1 answer
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • Explain how arrays are stored in memory? Show how arr [5] is stored in the memory. Assume each memory location is one byte long
    6·1 answer
  • Mika forgot to put in the function name in his function header for the code below. What would be the best function header?
    12·2 answers
  • Caroline is building an expert system for wartime defense. Which of these is true about the system she is building?
    14·1 answer
  • Which of the following file formats cannot be imported using Get & Transform?
    6·1 answer
  • What plugs into this?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!