Answer:
The code is given below
hours = int(input("Enter time in hour: "))
minutes = int(input("Enter time in minute: "))
total time = (hours * 60) + (minutes + 15
)
total hours = int(total minutes / 60)
minutes = total hours/ 60
print("Hours: " + str(hours))
print("Minutes: " + str(minutes))
The only thing that a computer actually understands is machine language. English-like constructs are gibberish to a computer, so they need to be translated by a compiler to machine language to run natively.
Answer:
Scanner can be used to read tokens from the console window (user input)
Explanation:
Scanner is a class used in some programming languages to obtain inputs from users.
It is mostly well developed in Java programming language and used exclusively for taking and obtaining inputs.
Scanner takes input in primitive types such as doubles, floats and integers. IT also takes string inputs.
Here is a code snippet where the class scanner is used:
Scanner input = new Scanner (System.in)
The code above creates an object of the scanner class
Answer:
(a) Weak passwords
Explanation:
Typically, a password is weak if it is easily discovered by all persons including unauthorized users. When passwords to a network are weak, the network is vulnerable to unauthorized access and may permit access to proprietary code, accounting files and other sensitive documents in the network.
Examples of weak passwords are;
i. those generated from the name of a user.
ii. those generated for a user by default.
iii. those generated from words from dictionary or other similar materials.
iv. those that don't include a combination of letters and numbers and even symbols.
v. those that are short in length e.g less than 8 characters.