Computers and Technology

Consider the following code: x = int(input("input an integer: ")) if (x > = 0): print("yay! ") else: print("boo! ") it outputs "yay! " if the value is positive and "boo! " if the value is negative. change the condition so that it only outputs "yay! " if the value is non-negative (i. e. zero or positive) and even. x > = 0 and x % 2 == 0 x > = 0 and x % 2 == 1 x > = 0 or x % 2 == 1 x > = 0 or x % 2 == 0.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:30, reinasuarez964
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
image
Computers and Technology, 24.06.2019 02:10, sIatt
Consider the usual algorithm to convert an infix expression to a postfix expression. suppose that you have read 10 input characters during a conversion and that the stack now contains these symbols: (5 points) | | | + | | ( | bottom |_*_| now, suppose that you read and process the 11th symbol of the input. draw the stack for the case where the 11th symbol is
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, greenhappypiggies
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
image
Computers and Technology, 24.06.2019 04:30, andrespacheco5888
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
Do you know the correct answer?
Consider the following code: x = int(input("input an integer: ")) if (x > = 0): print("yay! ")...

Questions in other subjects:

Konu
Mathematics, 02.09.2019 03:00
Konu
Mathematics, 02.09.2019 03:00
Konu
History, 02.09.2019 03:00