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
lord [1]
2 years ago
13

What is the difference between a function with parameters, and a function without parameters? *

Computers and Technology
1 answer:
Romashka [77]2 years ago
8 0

Answer:

A function with out parameters cannot take any arguments or perform operations on variables passed in. A function with parameters can.

You might be interested in
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.
Paraphin [41]

Answer:

The program to this question as follows:

Program:

#defining variable and assign value

odd=0  

even=0  

i=1  

print('Input 0 after inserting all number: ') #print message

while i>0: #define loop for check inserting and add all number

   i=int(input()) #input value by user end

   if (i< 0): #check value is not positive

       break

   if ((i % 2)==0and(i>0)): #check even number condition

       even=even+i #add even numbers

   if ((i % 2)!=0and(i>0)): #check odd number condition

       odd=odd+i #add odd numbers

print ('Sum of Even number:',even,'and','Sum of Odd number:',odd) #print value

Output:

Input 0 after inserting all number:  

1

2

3

5

7

0

Sum of Even number: 2 and Sum of Odd number: 16

 Explanation:

In the above python program, three variable is defined, that is "even, odd and i", in which "even and odd" variable assign value that is "0", and the variable i is used for inserting elements from user. In the next line a while loop is defined that inserts numbers in variable "i", in this loop, 3 if block is used that can be defined as follows:

  • In first if block variable "i", checks that value is non-positive number if this condition is true, it will break the loop.
  • In second if block this block check even number condition and add in even variable.
  • In third, if block this block check odd number condition and add in odd variable.  

End of the loop we use print function that prints the sum of even numbers and odd numbers.

3 0
3 years ago
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
Sever21 [200]

Answer:

The solution is written using Python as it has a simple syntax.

  1. def getHighScores(gameScores, minScore):
  2.    meetsThreshold = []
  3.    for score in gameScores:
  4.        if(score > minScore):
  5.            meetsThreshold.append(score)
  6.    return meetsThreshold
  7. gameScores = [2, 5, 7, 6, 1, 9, 1]
  8. minScore = 5
  9. highScores = getHighScores(gameScores, minScore)
  10. print(highScores)

Explanation:

Line 1-8

  • Create a function and name it as <em>getHighScores</em> which accepts two values, <em>gameScores</em> and <em>minScore</em>. (Line 1)
  • Create an empty list/array and assign it to variable <em>meetsThreshold</em>. (Line 2)
  • Create a for loop to iterate through each of the score in the <em>gameScores</em> (Line 4)
  • Set a condition if the current score is bigger than the <em>minScore</em>, add the score into the <em>meetsThreshold</em> list (Line 5-6)
  • Return <em>meetsThreshold</em> list as the output

Line 11-12

  • create a random list of <em>gameScores</em> (Line 11)
  • Set the minimum score to 5 (Line 12)

Line 13-14

  • Call the function <em>getHighScores()</em> and pass the<em> gameScores</em> and <em>minScore </em>as the arguments. The codes within the function <em>getHighScores()</em>  will run and return the <em>meetsThreshold </em>list and assign it to <em>highScores.</em> (Line 13)
  • Display <em>highScores</em> using built-in function print().
8 0
3 years ago
When you receive a rejection message from an employer, you should?
Sergio039 [100]
Move on and continue your job search!
3 0
3 years ago
An electronic spreadsheet is a type of<br> archive.<br> database.<br> document.<br> periodical.
zhenek [66]

Answer:

The answer is "database"

Explanation:

The spreadsheet is an application program, that is used to organized, analysis, and store data in tabular format. It is also used to import data and provide a database in programming that is used to store data and other option is not correct that can be described as follows:

  • Archive uses VBA that stands for "Visual Basic for Applications", it is used to store data in an archive file, that's why it is not correct.
  • Document is a file that is used to store data, that's why it is not correct.
  • Periodical use graph and bar charts to display data graphically, that's why it is not correct.

7 0
3 years ago
Read 2 more answers
Macy reviewed Steve's presentation. Images in the slides were distracting from the presentation. What advice should
murzikaleks [220]
From what i learned from school, have a theme for the presentation and only have 1-3 pictures per slide that aren’t too big but small enough so you can read and see, also pictures that are self explanatory
8 0
3 years ago
Read 2 more answers
Other questions:
  • In the Remote Access Domain, if private data or confidential data is compromised remotely, you should set automatic blocking for
    5·1 answer
  • You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
    9·2 answers
  • All digital images are made up from varying rectangles of color, called _____________.
    6·2 answers
  • Co to jest podprogram (procedura lub funkcja)? Zaznacz poprawną odpowiedź. a) Wielokrotne powtarzanie tych samych poleceń. b) Wy
    8·1 answer
  • You can tell a cell is the active cell when it has a
    14·2 answers
  • Your boss is very skeptical about the idea of storing his files up in the cloud rather
    8·1 answer
  • A store trying to analyze the behavior of its customers will often maintaina two-dimensional array A, where the rows correspond
    6·1 answer
  • Write a question that the database will understand. Which records are not equal to 5? &lt; 5 &gt; 5 &gt; =5 &lt; &gt; 5
    15·1 answer
  • Write a program to read 10 integers from an input file and output the average, minimum, and maximum of those numbers to an outpu
    14·1 answer
  • A. Why are the data known as raw facts? Explain.​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!