In python 3.8:
salary = 92000
years = 4
if years == 1:
salary += (salary*0.02)
elif years == 2:
salary += (salary * 0.03)
elif years == 3:
salary += (salary *0.04)
elif years == 4:
salary += (salary*0.05)
elif years >= 5:
salary += (salary*0.06)
print(salary)
If we run this code, Ann's new salary will be 96600.
Answer:
01010011000101100001
Explanation:
In computing and electronic systems, a binary-coded decimal (BCD) is a digital encoding method for decimal numbers in which each digit is represented by its own binary sequence.
The answer is C, all the notes for all the pages, arranged in sequential order.
Answer:
Following are the code to this question:
userVal = input()#defining a variable userVal for input the value
x= 0#defining variable x that holds a value 0
for j in userVal:#defining for loop to count input value in number
if not(j in " .,"):#defining if block that checks there is no spaces,periods,and commas in the value
x += 1#increment the value of x by 1
print(x)#Print x variable value
Output:
Hello, My name is Alex.
17
Explanation:
In the above-given code, a variable "userVal" is defined that uses the input method for input the value from the user end, in the next line, an integer variable "x" is defined, hold value, that is 0, in this variable, we count all values.
- In the next line, for loop is defined that counts string value in number and inside the loop an if block is defined, that uses the not method to remove spaces, periods, and commas from the value and increment the value of x by 1.
- In the last step, the print method is used, which prints the calculated value of the "x" variable.