Saving a python file implies that one wants to have a physical file of the program on a storage device.
To save a python program, the following step must be followed
- Select Save As
- Navigate to the directory where you want to save the file
- Enter the file name
- Click save
Note that python files are saved in the .py extension
Read more about python programs at:
brainly.com/question/16397886
Answer:
to tell the program to take a different action when the If statement answer is false
Explanation:
if x = 0:
print('x equals 0')
else:
print('x equals something else that isnt 0')
<span>middle-click the link (e.g., mouse scroll wheel)<span>Ctrl+click the link (Mac: Command+Click)</span></span>
Answer:
Mistakes can easily occur while using them.
def func():
total = 0
while True:
pet = input("What pet do you have? ")
if pet == "rock":
return
total += 1
print("You have a {} with a total of {} pet(s)".format(pet, total))
func()
We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.