Explanation:
Mechanical engineer may design a gps for a vehicle.
Answer:
class Car(object):
fuel = 0
def __init__(self, mpg):
self.mpg = mpg
def drive(self, mile):
if self.fuel * self.mpg >= mile:
self.fuel -= mile / self.mpg
else:
print(f"get gas for your {self}")
print(f"Fuel remaining: {self.fuel}")
#classmethod
def get_gas(cls):
cls.fuel += 50
#classmethod
def add_gas(cls, gallon):
if cls.fuel + gallon > 50:
cls.fuel += 10
else:
cls.fuel += gallon
gulf = Car(20)
gulf.get_gas()
gulf.drive(200)
Explanation:
The Car class is defined in Python. Its drive method simulates the driving of a car with fuel that reduces by the miles covered, with efficiency in miles per gallon. The get_gas and add_gas methods fill and top up the car tank respectively.
Answer:
Option(c) is the correct answer.
Explanation:
Cross-site scripting is the type of security breach that are usually found in the software applications.The main objective of cross site scripting it is used by the hackers to exploit the data security.
- The cross site scripting is the collection of web pages that enables people to insert the text like comment, name stores it afterwards it save the data and then it appears to the other users.
- Others options are incorrect because they are not related to given scenario.