favorite_color = input("Enter favorite color:\n")
pet = input("Enter pet's name:\n")
num = input("Enter a number:\n")
print("You entered: "+favorite_color+" "+pet+" "+num)
password1 = favorite_color+"_"+pet
password2 = num+favorite_color+num
print("First password: "+password1)
print("Second password: "+password2)
print("Number of characters in "+password1+": "+str(len(password1)))
print("Number of characters in "+password2+": "+str(len(password2)))
This works for me.
The combination of two or more networks is internet work!!
Hope this helps
The elements in a string type array will be initialized to "Null".
Answer:
The given statement is false statement.
Explanation .
- The assignment is assigning the value to the variable or we can say that it will also be used to initialize the variable The "=" is the symbol of the assignment operator.
int r=90, The value of variable 90 is assigned to 90.
- The associativity, of assignment, is always right to left which means The right-hand side is firstly evaluated then it will be assigned in left-hand side variable or expression.
You have been given the following String which represents a series of 6 side die rolls:rolls = "1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,
Anni [7]
Answer:
see explaination
Explanation:
rolls="1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,2"
list1 = list(rolls.split(","))
print("The total # of rolls: {}".format(len(list1)))
j=0
for i in list1:
j+=int(i)
print("Total value of all rolls: {}".format(j))
print("Average roll: {}".format(j/len(list1)))
Please kindly check attachment for program code and output