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
We will pass in a value N. Ouput every even value between 0 and N. Tip: you may remember the modulo operator. 10 % 3 returns the
Taya2010 [7]

Answer:

def odd_even(N):

   for number in range(0, N+1):

       if number % 2 == 0:

           print(str(number) + " is even")

       elif number % 2 == 1:

           print(str(number) +" is odd")

odd_even(5)

Explanation:

- Create a method called odd_even that takes one parameter, N

- Initialize a for loop that iterates through 0 to N

Inside the loop, check if module of the number with respect to 2 is equal to 0. If yes, print it as even number. If module of the number with respect to 2 is equal to 1, print it as odd number

Call the method

6 0
3 years ago
What is the definition of phishing with an example
Diano4ka-milaya [45]
Phishing is an ability of fraudulently obtaining personal info.
synonyms: Fraud and scam
8 0
3 years ago
A ball is released from a 10 m high roof and bounces two thirds as high on each successive bounce. After traveling a total of 40
skelet666 [1.2K]

Answer:

Four times traveling 40,12345 mts

Explanation:

We can express this as a sum as follows

\sum_{i=1}^4(10\cdot  \frac{2}{3}^{i - 1} + 10\cdot  \frac{2}{3}^{i } ) = 3250/81=40.12345679

The first term is the dropping part and the second is the upward motion. this sums up to 40,12345 m after bouncing four times. As a program we could write using the while loop.

distance=0;

i:=0;

while distance<40 do

i:=i+1;

distance:=distance+ 10\cdot  \frac{2}{3}^{i - 1} + 10\cdot  \frac{2}{3}^{i };

end while;

Here the answer is in i and the closest distance traveled after reaching 40 is in the variable distance.

4 0
4 years ago
Is pycharm neccessary in python
Bess [88]

mcvaefn<AMsdnmklmgkdmflavm

The answer is No

4 0
3 years ago
Read 2 more answers
BI U
elena-s [515]

Answer:

This should be done in a PowerPoint presentation and word processor like MS PowerPoint and MS Word (if I understood your question correctly)

6 0
3 years ago
Other questions:
  • We have written a method called sum with an int[] parameter nums. We want our sum method to compute the sum of nums, but our cod
    5·1 answer
  • Imagine Frankie has a computer with a full hard drive. She needs to create and save a new document, so she deletes a bunch of ol
    8·1 answer
  • Can use some help with Computer Networking, with a focus on routing protocols. Part A: Which of these routing protocols is the o
    5·1 answer
  • Which are technical and visual demands<br> that need to be considered when<br> planning a project?
    6·1 answer
  • Which action is applicable only to tables?
    13·1 answer
  • Identify two real-world examples of problems whose solutions do scale well
    13·1 answer
  • The Open Systems Interconnection (OSI) Reference Model: defines standards for many aspects of computing and communications withi
    12·1 answer
  • What is the computer generation​
    15·1 answer
  • Which statement best describes the logic in a while loop?bringing an umbrella to determine if it is rainingbringing an umbrella
    7·1 answer
  • In python please.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!