Answer:
\n
Explanation:
readline() method is used to read one line from a file. It returns that line from the file.
This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.
So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.
For example if the file "abc.txt" contains the lines:
Welcome to abc file.
This file is for demonstrating how read line works.
Consider the following code:
f = open("abc.txt", "r") #opens the file in read mode
print(f.readline()) # read one line from file and displays it
The output is:
Welcome to abc file.
The readline() method reads one line and the print method displays that line.
Answer:
num1 = int(input("Enter number 1: "))
num2 = int(input("Enter number 2: "))
num3 = int(input("Enter number 3: "))
print(max(num1,num2,num3))
Explanation:
Python 3
Answer:
True
Explanation:
for loop is used to repeat the process again and again until the condition not failed.
syntax:
for(initialize; condition; increment/decrement)
{
Statement
}
But we can omit the initialize or condition or increment/decrement as well
the syntax after omit the initialization,
for( ; condition; increment/decrement)
{
Statement
}
The above for loop is valid, it has no error.
Note: don't remove the semicolon.
You can omit the condition and increment/decrement.
and place the semicolon as it is. If you remove the semicolon, then the compiler show syntax error.
Answer:
C. Spoofing.
Explanation:
Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.
Some examples of cyber attacks are phishing, zero-day exploits, denial of service, man in the middle, cryptojacking, malware, SQL injection, spoofing etc.
Spoofing can be defined as a type of cyber attack which typically involves the deceptive creation of packets from an unknown or false source (IP address), as though it is from a known and trusted source. Thus, spoofing is mainly used for the impersonation of computer systems on a network.
Basically, the computer of an attacker or a hacker assumes false internet address during a spoofing attack so as to gain an unauthorized access to a network.
Answer:
price float(price)
Explanation:
There are four basic type of data type use in the programming to declare the
variable.
1. int: it is used for integer values.
2. float: it is used for decimal values.
3. char: it is used for character values
4. Boolean: it is used for true or false.
in the question, the one option contain the data type float (price float(price)). So, it store the value in decimal.
price int(price): it store the value in integer.
price decimal(price): it is wrong declaration of variable. their is no data type in the programming which name is decimal.
price price(decimal): it is wrong declaration of variable. their is no data type in the programming which name is price.