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
Reil [10]
2 years ago
6

QUESTION 44 To determine whether a character entered is a letter of the alphabet, use the ________ function. isdigit fromkeyboar

d alpaok isalpha None of these
Computers and Technology
1 answer:
lord [1]2 years ago
6 0

In order to determine whether the character you entered is a letter of the alphabet, you should use this function: C. isalpha ().

<h3>What is a function?</h3>

A function can be defined as a named portion of a block of executable code that is written to perform a specific task, which is usually a single, related action.

This ultimately implies that, a function comprises a group of related statements (executable blocks of code) that would only run and return a data whenever it is called by a software program.

In Computer programming, you should use the isalpha () function to determine whether the character you entered is a letter of the alphabet because it would return a true (a non-zero number), if the argument is a letter of the alphabet.

Read more on a function here: brainly.com/question/19181382

#SPJ1

You might be interested in
Can someone please do this java lab for me (100 point version)? Im really having trouble. (DO NOT GIVE FAKE, USELESS ANSWERS. I
Dima020 [189]

Answer:

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

8 0
3 years ago
Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
rosijanka [135]

a set of elements that unify the slides and complement the topic

8 0
3 years ago
Read 2 more answers
When creating an html document, what do we use to set aside space for content?.
LUCKY_DIMON [66]

AnswerTags:

Explanation:

3 0
2 years ago
Consider the classes below:
jeka57 [31]

Answer:

Hi!

The correct answer is d. Neither (a) nor (b) is true.

Explanation:

First, you have to know what the scripts intend to do, and they are counting from 1 to 10 in both cases.

Table of results of class TestA at end of each iteration:

[j = 0,  counter =  1]

[j = 10,  counter =  2]

[j = 20,  counter =  3]

[j = 30,  counter =  4]

[j = 40,  counter =  5]

[j = 50,  counter =  6]

[j = 60,  counter =  7]

[j = 70,  counter =  8]

[j = 80,  counter =  9]

[j = 90,  counter =  10]

Table of results of class TestB at end of each iteration:

[j = 10,  counter =  1]

[j = 9,  counter =  2]

[j = 8,  counter =  3]

[j = 7,  counter =  4]

[j = 6,  counter =  5]

[j = 5,  counter =  6]

[j = 4,  counter =  7]

[j = 3,  counter =  8]

[j = 2,  counter =  9]

[j = 1,  counter =  10]

That's why a) and b) are false.

Maybe you want to know why using pre increments on class TestB doesn't affect the loop. The reason is that when enters in a loop, first checks the test condition and takes the decision if true or false, and last executes the incrementation step.

7 0
3 years ago
Develop a program working as a soda vending machine. The program should show the product menu with price and take user input for
Kipish [7]

Answer:

Explanation:

The following vending machine program is written in Python. It creates various functions to checkItems, check cash, check stock, calculate refund etc. It calls all the necessary functions inside the main() function. The output can be seen in the attached picture below.

class Item:

   def __init__(self, name, price, stock):

       self.name = name

       self.price = price

       self.stock = stock

   def updateStock(self, stock):

       self.stock = stock

   def buyFromStock(self):

       if self.stock == 0:

           # raise not item exception

           pass

       self.stock -= 1

class VendingMachine:

   def __init__(self):

       self.amount = 0

       self.items = []

   def addItem(self, item):

       self.items.append(item)

   def showItems(self):

       print('Items in Vending Machine \n----------------')

       for item in self.items:

           if item.stock == 0:

               self.items.remove(item)

       for item in self.items:

           print(item.name, item.price)

       print('----------------\n')

   def addCash(self, money):

       self.amount = self.amount + money

   def buyItem(self, item):

       if self.amount < item.price:

           print('You can\'t but this item. Insert more coins.')

       else:

           self.amount -= item.price

           item.buyFromStock()

           print('You chose ' +item.name)

           print('Cash remaining: ' + str(self.amount))

   def containsItem(self, wanted):

       ret = False

       for item in self.items:

           if item.name == wanted:

               ret = True

               break

       return ret

   def getItem(self, wanted):

       ret = None

       for item in self.items:

           if item.name == wanted:

               ret = item

               break

       return ret

   def insertAmountForItem(self, item):

       price = item.price

       while self.amount < price:

               self.amount = self.amount + float(input('insert ' + str(price - self.amount) + ': '))

   def calcRefund(self):

       if self.amount > 0:

           print(self.amount + " refunded.")

           self.amount = 0

       print('Thank you!\n')

def main():

   machine = VendingMachine()

   item1 = Item('Kit Kat',  1.5,  2)

   item2 = Item('Potato Chips', 1.75,  1)

   item3 = Item('Snickers',  2.0,  3)

   item4 = Item('Gum',  0.50, 1)

   item5 = Item('Doritos',0.75,  3)

   machine.addItem(item1)

   machine.addItem(item2)

   machine.addItem(item3)

   machine.addItem(item4)

   machine.addItem(item5)

   print('Welcome!\n----------------')

   continueBuying = True

   while continueBuying == True:

       machine.showItems()

       selected = input('select item: ')

       if machine.containsItem(selected):

           item = machine.getItem(selected)

           machine.insertAmountForItem(item)

           machine.buyItem(item)

           a = input('buy something else? (y/n): ')

           if a == 'n':

               continueBuying = False

               machine.calcRefund()

           else:

               continue

       else:

           print('Item not available. Select another item.')

           continue

if __name__ == "__main__":

   main()

8 0
3 years ago
Other questions:
  • When configuring services, what linux directory typically contains server configuration files?
    8·1 answer
  • Which term describes the degree to which a network can continue to function despite one or more of its processes or components b
    14·1 answer
  • An attacker compromises the Washington Post's web server and proceeds to modify the homepage slightly by inserting a 1x1 pixel i
    12·1 answer
  • What are the benefits of transferable skills check all the boxes that apply
    6·2 answers
  • What does it mean to catch an exception?
    8·1 answer
  • What are the most positive and the most negative decimal numbers that can be represented by a 2C (n+k) bit fixed-point number, w
    12·1 answer
  • Joseph wants to take out the color of the background wall from an image what can Joseph do to achieve this​
    5·2 answers
  • Study the original and changed passages.
    8·2 answers
  • Get ready to be the Quizmaster! You are going to design your own Python game show in the style of a quiz.
    13·1 answer
  • What would you need to do if you wanted a computer to always look for a bootable CD before looking to the local hard drive
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!