Answer:
def dice_roller():
# ask for first input
input1 = int(input("Enter the first roll: "))
# check if it's valid
while input1 < 1 or input1 > 6:
print("Invalid number")
# ask for new input if the previous was invalid
input1 = int(input("Enter the first roll: "))
# ask for second input
input2 = int(input("Enter the second roll: "))
# check if it's valid
while input2 < 1 or input2 > 6:
print("Invalid number")
# ask for new input if the previous was invalid
input2 = int(input("Enter the second roll: "))
# check of the numbers are the same
if input1 == input2:
print("You rolled the same numbers. Try again")
# if they are the same call this function again to get new numbers
dice_roller()
else:
# print how many spaces to advance
print("Advance", input1+input2, "spaces")
if __name__ == '__main__':
dice_roller()
a. Pass parameters in registers
b. Registers pass starting addresses of blocks of parameters
c. Parameters can be placed, or pushed, onto the stack by the program, and popped off the stack by the operating system
Answer:
It gives a new string
Explanation:
In programming; when two or more strings are concatenated by a concatenating operator, the result is always a new string.
From the question, we have that
str1 = "Good
str2 = "Evening"
Let's assume that + is the concatenating operator;
str1 + str2 = "Good" + "Evening" = "GoodEvening"
The result of concatenating str1 and str2 is a new string "GoodEvening" while str1 and str2 still maintain their original string value of "Good" and "Evening"
External hard drives typically connect to a computer via an external port (such as a USB or <u>thunderbolt</u> port) or a wireless connection.
<h3>What is a hard drive?</h3>
A hard drive can be defined as an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.
In Computer technology, all hard drives are commonly installed on computers and other digital service for the storage of digital files and to enable the booting of a computer through its operating system (OS).
<h3>What is a memory?</h3>
A memory can be defined as a terminology that is used to describe the available space on an electronic device that is typically used for the storage of data or any computer related information such as:
In conclusion, all external hard drives typically connect to a computer through an external port such as a USB, <u>thunderbolt</u> port, or a wireless connection.
Read more on hard drive here: brainly.com/question/26382243
#SPJ1