Answer:
Following are the code to this question:
def binarynumber(num):#defining a method binarynumber that accepts a parameter num
x=""#defining a string variable x
if (num!=0):#defining if condition to check number not equal to 0
while (num>=1):#defining a loop that check value is grater then equal to one
if (num %2==0):#defining if condition to check num is even
x=x+"0" #add string value 0 in num variable
num=num/2 #divide the value by 2
else:#defining else block
x=x+"1"#add string value 1 in num variable
num=(num-1)/2#first subtract 1 into num variable then divide the value by 2
else:
x="0"#assign string value 0 in num variable
return "".join(reversed(x))#return value
num = int (input ("Enter any number: "))#defining num variable that input the integer value
print (binarynumber(num))#using print method to call method binarynumber with passing num parameter
Output:
Enter any number: 12
1100
Explanation:
- In the above python code a method "binarynumber" is declared, in which the "num" variable passes as the parameter inside the method a string variable "x" is declared that stores all converted values.
- Inside the method and if the block is declared that checks number value is not equal to 0 if this condition is false then it will add string value and reverse its value.
- Or if the condition is true it defines a while loop that calculates the given number binary digits and returns its value.
- At the last step, the num variable is declared that inputs the integer value from the user end and calls the method by using the print method.
That would depend on what you would like to get out of your experience with the web broswer. Google chrome offers more efficient computational algorhythms, a quicker navigation of the UI, but loses privacy due to the connected google services which can report your data usage if not properly configured.Browsers like firefox offer extension capability (the same as google chrome) and is open sourced, but may be slower to navigate depending on user to user experience.Other browsers i would avoid unless they are: TOR (which is still just a heavily modified and secured version of firefox).
Answer:
true
Explanation:
Based on the information provided within the question it can be said that this statement is completely true. Programming code is built as a series of steps that are followed in a linear way. So much so that one action needs to be completed before another action can begin. There are also conditions such as, if step 1 is true then execute step 2, these are all sequences that must be understood by the individual writing the code.