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
liberstina [14]
4 years ago
5

Python

Computers and Technology
1 answer:
xeze [42]4 years ago
3 0

Answer:

Following are the function to the Python Programming Language.

#define a function to read or crates the list

def GetUserValues():

 my_list=[]

 n=int(input("Enter range: "))

 for i in range(n):

   my_list.append(int(input(" :")))

 return my_list

#define a function to check the elements of the list

def IsListEven(mylist):

 #set the for loop

 for i in range(len(mylist)):

   #set if condition to check odd number

   if mylist[i]%2 !=0:

     #if condition is true retun false

     return False

 #otherwise return true

 return True

#define a function to check the elements of the list

def IsListOdd(mylist):

 #set the for loop

 for i in range(len(mylist)):

   #set if condition to check even number

   if mylist[i]%2==0:

     #if condition is true retun false

     return False

 #otherwise return true

 return True

#set variable to store list

l=GetUserValues()

#set if condition to check the function is true

if IsListOdd(l)==True:

 #then, print the message

 print("all odd")

#set elif condition to check the function is true

elif IsListEven(l)==True:

 #then, print the message

 print("all Even")

else:

 #otherwise print message.

 print("not even or odd")

<u>Output:</u>

Enter range: 5

:2

:4

:6

:8

:10

all Even

Explanation:

Here, we define a function "GetUserValues()" and inside the function.

  • Set the list data type variable "my_list" then, get input from the user in the variable "n".
  • Set the for loop which starts from 0 and end at the variable "n" then, get input from the user and appends inputs in the variable "my_list".
  • Then, we return list and close the function.

Then, we set a function "IsListEven()" and pass an argument "mylist" to check the elements is even or not, if the list elements is even then, return true otherwise, return false.

Then, we set a function "IsListOdd()" and pass an argument "mylist" to check the elements is odd or not, if the list elements is odd then, return true otherwise, return false.

Finally, we call and store the function in the variable "l" then, set conditions to check the list is even print "all even", if the is odd "all odd" otherwise, print "not even or odd".

You might be interested in
Qué es que puede pasar lo mismo con la galaxia<br>​
White raven [17]

Answer:

If u need it to b translated: What can the same thing happen to the galaxy?

Explanation:

No sé, esa oración no tiene sentido

3 0
3 years ago
Which is most likely to cause confusion, hinder thinking, and prevent quick access to resources in a study environment? phones c
OverLord2011 [107]
Clutter will cause the most problems when you are trying to study because <span>If you’re unable to get through the material clogging up your </span>neural<span> networks, so the theory goes, you’ll be slower and less efficient in processing information. As a result, you’ll be incapacitated when it comes to short-term memory tasks, and even in longer-range mental exercises when you have to come up with information you should know, such as names of people, that you can no longer find within your disorganized repository of knowledge.

Hope this helps, 

kwrob</span>
3 0
4 years ago
Read 2 more answers
Which of the following is a set of short-range wireless technologies used to share information among devices within about two in
8_murik_8 [283]

Answer:

Option (c) NFC

Explanation:

  • The NFC Technology is a Wireless Technology which works in the range of 10 cm or less.
  • NFC stands for Near Field Communications.
  • The name itself indicates that it a communication mode with the near by objects.
  • The NFC technology is used in Access Cards, Payment Cards and Mobile Devices etc.
  • Option (a) IM - Instant Messaging is the instant text messaging technology sends and receives messages over the internet. It is used in Social Media where instant messaging is available. So, option (a) is not correct option.
  • Option (b) text messaging the technology is the technology in which the text messages are sent over the mobile networks ( in case of text messaging in mobile phones ) or over the internet ( emails, blogging etc). So, option (b) is not correct option.
  • Option (d) DES is not a short range wireless technology. So, option (d) is not correct.
  • Option (c) NFC is correct option.
3 0
3 years ago
Can someone please do this java lab for me (100 point version)?
nalin [4]

Answer:

.........................................sorry, dude I download the doc but ,I can't open it.

5 0
3 years ago
type the correct answer in the box. Spell all words correctly. Which element of the presentation software can you use to add cal
Anuta_ua [19.1K]

Answer:

The element of the presentation software that can be used to add callous and banners is SHAPES

Using the INSERT TAB, you can add callouts and banners to a slide.

Explanation:

If you want to add callouts and banners to a slide, the presentation software that can be used is PowerPoint.

The element that is used to add it is called shapes and can be found in the Insert Tab.

6 0
3 years ago
Other questions:
  • Write a Tip Calculator in code in VMware Fusion
    13·1 answer
  • When an object is selected, it is surrounded by ________, which allow you to change the size of the object.?
    5·1 answer
  • What is the average reading rate for middle school students?
    12·1 answer
  • Which of these automotive repair areas helps the vehicle change speeds to operate efficiently under all conditions?
    5·1 answer
  • Litmus-type test strips are used to test coolant for freeze protection and ?
    12·1 answer
  • Which of the following keys on a keyboard allows you to select multiple cells located in different parts of your worksheet?
    13·2 answers
  • Stella is a bank executive. She is preparing a spreadsheet on the loan repayment schedules of customers. Which function can she
    9·1 answer
  • Select the correct answer.
    15·1 answer
  • Dean has been using computers for some time now, but he is unfamiliar with a number of utility programs. In order to better main
    12·1 answer
  • One driving technique to increase fuel efficiency is.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!