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
aniked [119]
3 years ago
15

Using range(1,101), make two list, one containing all even numbers and other containing all odd numbers. How can I do this on Py

thon
Computers and Technology
1 answer:
jeka943 years ago
4 0

Answer:

even = []

odd = []

for i in range(1,101):

if i % 2 == 0:

even.append(i)

else:

odd.append(i)

You might be interested in
How to write greater than or equal to in excel if function
natali 33 [55]

Answer:>=

Explanation:3>=4

I

5 0
3 years ago
Write a program that asks for the names of three runners and the time, in minutes (no seconds, etc.), it took each of them to fi
Crank

Answer:

Complete python code with explanation and output results is given below

Explanation:

User is asked to input names of runners and their finishing time

We have to determine first, second and third according to their finishing time.

if else conditioning is used to determine who has lowest finishing time.

Outer if is used to decide first position and inner if is used to decide second and third position.

str() function is used to concatenate the integer variable with string

Code:

runner1 = input("Please enter name of the runner1 ")

time1 = int(input("Please enter the time of runner1 "))

runner2 = input("Please enter name of the runner2 ")

time2 =int(input("Please Enter name of the runner2 "))

runner3 = input("Please enter name of the runner3 ")

time3 =int(input("Please Enter name of the runner3 "))

if(time1 < time2 and time1 < time3):  

   if(time2 < time3): // to decide 2nd and 3rd position

       print(runner1+" has finished First with time: "+str(time1))

       print(runner2+" has finished Second with time: "+str(time2))

       print(runner3+" has finished Third with time: "+str(time3))

   else:

       print(runner1+" has finished First with time: "+str(time1))

       print(runner3+" has finished Second with time: "+str(time3))

       print(runner2+" has finished Third with time: "+str(time2))

if(time2 < time1 and time2 < time3):  

   if(time1 < time3):

       print(runner2+" has finished First with time: "+str(time2))

       print(runner1+" has finished Second with time: "+str(time1))

       print(runner3+" has finished Third with time: "+str(time3))

   else:

       print(runner2+" has finished First with time: "+str(time2))

       print(runner3+" has finished Second with time: "+str(time3))

       print(runner1+" has finished Third with time: "+str(time1))

if(time3 < time1 and time3 < time2):

   if(time2 < time1):    

       print(runner3+" has finished First with time: "+str(time3))

       print(runner2+" has finished Second with time: "+str(time2))

       print(runner1+" has finished Third with time: "+str(time1))

   else:

       print(runner3+" has finished First with time: "+str(time3))

       print(runner1+" has finished Second with time: "+str(time1))

       print(runner2+" has finished Third with time: "+str(time2))

Output:

Program has been tested with multiple inputs and results are accurate as per problem specifications.

Please enter name of the runner1 danny

Please enter the time of runner1  45

Please enter name of the runner2  sam

Please enter the time of runner2  34

Please Enter name of the runner3  tedd

Please enter the time of runner3  23

tedd has finished First with time: 23

sam has finished Second with time: 34

danny has finished Third with time: 45

5 0
4 years ago
A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
storchak [24]

Answer:

The first question you should ask yourself before performing the repair is Option B. Can you find a replacement motherboard.

Explanation:

According to me, I would ask “Can you find a replacement motherboard”.

Because, Always the laptop charge will be more than the charge of a mother board, because motherboard is just a part and the laptop consists of other important parts too. So Option (a) is not the wise selection.

Let’s look into option D. Warranty period should be verified by us and not the technical person, because we have purchased and we have the warranty card.

Let’s look into option C. The technical person will already be well-versed with fixing solution and diagnosing problem. So service manual will be of not much use to him and he would want to make money out of fixing the problem, so we cannot expect him to teach us how to replace a motherboard.

5 0
4 years ago
55 POINTS, IN JAVA
ikadub [295]

public class JavaApplication82 {

   

   public static void main(String[] args) {

       

       for (int i = 1; i <= 9; i++){

           for (int w = 0; w < i; w++){

               System.out.print("*");

           }

           System.out.println("");

           

       }

   }

   

}

This works for me.

6 0
3 years ago
6. What is saddle-stitch binding?
kifflom [539]
Commonly known as book stapling, ‘saddle stitched’ is one of the most popular binding methods. The technique uses printed sheets which are folded and nestled inside each other. These pages are then stapled together through the fold line. Saddle stitched binding can be applied to all book dimensions and both portrait and landscape orientation.
5 0
3 years ago
Read 2 more answers
Other questions:
  • What vi command do you use to insert the a file named "file2.txt" to the end of your current file?
    12·1 answer
  • Web and mobile applications are created for users to only read information. True False
    15·2 answers
  • How to use command prompt​
    14·1 answer
  • The Blue Screen of death is not an common error, and it is highly likely that you have encountered and fixed several already. Di
    13·1 answer
  • Explain what a lookup table is (assembly). Write pseudo code
    13·1 answer
  • Lan is working on a project report that will go through multiple rounds of
    10·1 answer
  • Service and software companies typically have a high return-on-assets ratio because they require lower blank as compared to manu
    11·2 answers
  • What is one of the benefits of using a library in a program?
    5·1 answer
  • What function would you use to calculate the total interest paid for the first year of a mortgage?.
    15·1 answer
  • A network administrator is importing a list of certificates from an online source, so that employees can use a chain of trust an
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!