subject
Computers and Technology, 18.08.2020 14:01 mat1413

The following program is supposed to display a message indicating if the integer entered by the user is even or odd. What is wrong with the program? num = int(input("Enter an integer: "))
print("The integer is", evenOdd(num))
def evenOdd(n) :
if n % 2 == 0 :
return "even"
return "odd"
A. The function definition must appear before the function is called.
B. The input and print statements must reside in a function named main.
C. The variable num and the parameter variable n must have the same name.
D. An else clause must be added to the if statement.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Can someone who is skilled at coding create me a java chess game. don't copy from online source codes. make it original ! : d
Answers: 1
You know the right answer?
The following program is supposed to display a message indicating if the integer entered by the user...
Questions
question
Mathematics, 17.11.2020 03:00
question
Mathematics, 17.11.2020 03:00
question
Mathematics, 17.11.2020 03:00
Questions on the website: 13722360