Answer: Following code is in python
n=input()
num='1'
while int(num)<=int(n): //loop from 1 to n
flag=1 //if an unequal element will be found it will be 0
l=len(num)
if num[0]=='3':
j=0
k=l-1
while j<k: //loop till middle of number
if num[j]==num[k]:
j+=1 //from beginning
k-=1 //from end
else:
flag=0
break
if flag==1:
print(int(num))
num=str(int(num)+1) //number will be incremented as integer
INPUT :
1000
OUTPUT :
3
33
303
313
323
333
343
353
363
373
383
393
Explanation:
In the above code, a loop is executed till num is equal to n which is entered by the user. num is treated as a string so that to ease the process of checking first character is 3 or not. If it is 3 then another loop executes which checks if an element from starting is equal to the corresponding element from the end. If an element is not equal then the flag is changed and then we break out of the loop and prints the number if the flag isn't changed.
Answer:
Parameter
Explanation:
q: When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.
a: Parameter
Answer:
actual_value = float(input("Enter the actual value of a piece of property: "))
tax_rate = float(input("Enter the current tax rate for each $100.00 of assessed value: "))
assessed_value = actual_value * 0.6
tax = (assessed_value * tax_rate) / 100
print("The annual property tax is $" + str(tax))
Explanation:
*The code is in Python.
Ask the user to enter the actual value and the tax rate
Calculate the assessed value, multiply the actual value by 0.6
Calculate the tax, multiply the assessed value by the tax rate and divide result by 100
Print the tax
Answer:
Since any even number divided by 2 has a remainder of 0, we can use modulo to determine the even-ess of a number. This can be used to make every other row in a table a certain color, for example.