Pseudocode:
import random
fetch user input on a lucky number
insert input into variable - "response"
new variable, random = randint
condition to check wheather random is our response
display results
Python Code:
import random
def main():
response = int(input("Guess my lucky number, its between 1 and 100: "))
lucky_number = random.randint(1,100)
if response == lucky_number:
print(f"Wow you're right, it is {lucky_number}")
else:
print("Sorry, Try Again")
main()
Reminder:
intended for python3 as i included the format f
also it could be done without the import, just manually insert a number
i'll leave the post mortum to you
Answer:
Answer is option (a) It includes data that has changed since the last full backup.
Explanation:
Differential Backup is a method used in Database Management Systems (DBMS) in which it includes the data (copies of all the files) that has changed (either created or updated or altered) since the last full backup. If it is a partial backup instead of full backup, then it is not a differential backup method as many files might have changed. Option (b) is false as the backup has to be a full backup not an incremental backup. Option (c) is false as the backup has to be a full backup ( not just a backup ), Option (d) is false as only the files that are changed is stored not the whole database since a full backup.
Answer:
fav_number=26
guess=0
while 0==0:
try:
guess=int(input('Enter your guess: '))
except:
print ('You have entered an invalid value.')
else:
if guess == fav_number:
break
elif guess>fav_number:
print ('Try a smaller number.')
elif guess<fav_number:
print ('Try a larger number')
Explanation:
define a variable fav_number and set it to number. write an infinite while loop to read input from user. In try block get input from user, if user enters invalid input code in except block will be executed. For valid input
- check if its greater than favorite number, if yes print try smaller number.
- check if its smaller than favorite number, if yes print try larger number.
- check if its equal to favorite number, break loop and exit
Answer:
The expression on line 9 required 2 brackets
Explanation:
Given
The attached code
Required
Why syntax error.
The error points to line 10, but the error is actually from line 9
To get an integer input, the syntax is:
variable-name = int(input("Prompt"))
From the attached code, the line 9 is:
amount = int(input("Enter cheese order weight: ")
By comparing the syntax to the actual code on line 9, only 1 of the brackets is closed.
<em>This, in Python 3 is a sytax error</em>
Answer:
Enables online download of music
Enables reading while exercising
Reduces the need for printing
Enables sending documents to multiple recipients
Provides savings on travel expenses by supporting virtual meetings
Provides flexible work schedules and environments
Explanation: