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
NemiM [27]
3 years ago
14

Qbasic program to check whether the given number is odd or even​

Computers and Technology
2 answers:
Iteru [2.4K]3 years ago
6 0

Answer:

CLS

INPUT "Enter a Number: ", n

IF n MOD 2 = 0 THEN

PRINT "Input Number is Even"

END IF

IF n MOD 2 = 1 THEN

PRINT "Input Number is Odd"

END IF

END

andrey2020 [161]3 years ago
6 0

Explanation:

CLS

INPUT "Enter a number:",N

IF N MOD 2=0 THEN

PRINT "given number is even"

ELSE

PRINT"given number is odd"

END IF

END

You might be interested in
Flowcharts allow you to more easily clarify among multiple potential solutions to a problem to see which solution is best.
timurjin [86]
Yes that is correct, but what is the question?
3 0
3 years ago
Write a function index(elem, seq) that takes as inputs an element elem and a sequence seq and returns the index of the first occ
Delicious77 [7]

Answer:

def index(elem, seq):

   for i in range(len(seq)):

       if elem == seq[i]:

           return i

   

   return len(seq)

print(index(5, [4, 10, 8, 5, 3, 5]))

Explanation:

Create a function named index that takes elem and seq as parameters

Create a for loop that iterates through the seq. If elem is equal to the item in the seq, return the i, index of the item.

If the elem is not found in the seq, this means nothing will be returned in the loop, just return the length of the seq, len(seq)

Call the function with given parameters and print the result

Note: Since 5 is in the list in the example, the index of the 5 which is 3 will be returned

5 0
3 years ago
A major retailer wants to enhance their customer experience and reduce losses
VikaD [51]

Answer:

Predict Demand

Explanation:

The type of Artificial Intelligence (Al) solution that would be suitable for solving this problem is "Predict Deman"

By predicting the demand of the potential consumer through the Artificial intelligence solution the retailer would be able to eliminate leftover out-of-stock scenarios because the adequate quantity of the products or demands will be provided thereby enhancing customers' experience arising from out-of-stock scenarios and reducing losses arising from the leftover.

8 0
3 years ago
Write a Python function uniquely_sorted() that takes a list as a parameter, and returns the unique values in sorted order.
ivann1987 [24]

Answer:

   Following is the program in Python language  

def uniquely_sorted(lst1): #define the function uniquely_sorted

   uni_que = [] #creating an array

   for number in lst1: #itereating the loop

       if number not in uni_que: #check the condition

           uni_que.append(number)#calling the function

   uni_que.sort() #calling the predefined function sort

   return uni_que #returns the  unique values in sorted order.

print(uniquely_sorted()([8, 6, 90, 76])) #calling the function uniquely_sorted()

Output:

[6,8,76,90]

Explanation:

   Following are the description of the Python program

  • Create a functionuniquely_sorted() that takes "lst1" as a list parameter.
  • Declared a uni_que[] array .
  • Iterating the loop and transfer the value of "lst1" into "number"
  • Inside the loop call, the append function .the append function is used for adding the element in the last position of the list.
  • Call the predefined function sort(for sorting).
  • Finally, call the function uniquely_sorted() inside the print function.

   

7 0
4 years ago
What is the number base of the binary number system?
Margarita [4]

Answer:

2

Explanation:

The system only uses 2 numbers which are 0 and 1 instead of the usual 10 numbers; 0, 1, 2, 3, 4, 5, 6, 7, 8 & 9.

4 0
1 year ago
Other questions:
  • What's the first step in being a wise consumer of media?
    10·2 answers
  • Which other capabilities do many wireless access points have? Choose two answers.
    9·1 answer
  • A file containing user information which is transmitted from an online server and attached to your web browser and stored on you
    11·1 answer
  • Computer-aided manufacturing (CAM) offers which possible benefits?
    15·2 answers
  • Why does world of tanks keep downloading when I'm not even at the computer
    9·1 answer
  • ACME Corp. is developing a software program that can run on mobile devices so that customers can interact with the firm, view pr
    13·1 answer
  • 1) Given what you have learned about computers and information technology thus
    6·1 answer
  • Selection Sort List the resulting array after each iteration of the outer loop of the selection sort algorithm. Indicate the num
    10·1 answer
  • Which three characteristics help identify a business opportunity? (Choose three)
    14·1 answer
  • Which web source citations are formatted correctly? check all that apply.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!