You could flip a coin twice. The result of the first toss chooses the morning activity, and the second toss determines the afternoon choice. There are only 4 different day-schedules available.
Answer:
yes a computer can evaluate expressions depends on the computer for the maybe expression
Explanation:
Answer:
def countdown(n):
if n <= 0:
print('Blastoff!')
else:
print(n)
countdown(n-1)
def countup(n):
if n >= 0:
print('Blastoff!')
else:
print(n)
countup(n+1)
number = int(input("Enter a number: "))
if number >= 0:
countdown(number)
elif number < 0:
countup(number)
<u>Outputs:</u>
Enter a number: 3
3
2
1
Blastoff!
Enter a number: -3
-3
-2
-1
Blastoff!
Enter a number: 0
Blastoff!
For the input of zero, the countdown function is called.
Explanation:
Copy the countdown function
Create a function called countup that takes one parameter, n. The function counts up from n to 0. It will print the numbers from n to -1 and when it reaches 0, it will print "Blastoff!".
Ask the user to enter a number
Check if the number is greater than or equal to 0. If it is, call the countdown function. Otherwise, call the countup function.
Answer:
The program in Python is as follows:
firstName = []
lastName = []
while True:
fName = input("First Name: ")
lName = input("Last Name: (Enter to quit): ")
if not lName:
break
firstName.append(fName)
lastName.append(lName)
for i in range(len(firstName)):
print(firstName[i] . lower()+"."+lastName[i] . lower()+" mycollege . edu")
Explanation:
See attachment for complete source file where comments are used as explanation
Answer: b
The computer virus is simply a ___
b. Set of computer instructions or code