Answer:
def replace_at_index(str, number):
new = str.replace(str[number], "-")
return new
print(replace_at_index("eggplant", 3))
Explanation:
- Create a function called <em>replace_at_index</em> that takes a string and an integer
- Initialize a new variable called <em>new</em>, that will hold the new string
- Replace the character at given index with dash using <em>replace</em> function, it takes two parameters: the first is the character we want to replace, the second is the new character.
- Return the new string
- Call the function with the required inputs
Answer:
The wireless adapter to use is the Wireless USB 2.0 Extender
Explanation:
The Wireless USB 2.0 Extender is a USB component that enables a computer to connect to and communicate with other computers on a network, or even to connect to the internet.
It uses an IEEE 802.11g radio platform and communicates within a radio frequency range of 2.4GHz.
Therefore, in cases where a notebook computer does not have a built-in wireless LAN card or PC card interface, you can use the Wireless USB 2.0 Extender as the best solution to that problem.
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:
a is the correct answer
Explanation:
correct me if I'm wrong hope it's help thanks
Answer:
The output will be:
B
o
n
d
0
0
7
Explanation:
Given code is of Python language
Let us look at the code line by line
The first line is:
my_list = [7, 0, 0, "d", "n", "o", "B"]
This line will create a list with the given elements.
my_list.reverse()
This line will reverse the sequence of the elements of the list
for thing in my_list:
print (thing)
These lines will simply print the reversed elements of the list on screen.
The output will be:
B
o
n
d
0
0
7