Answer:
In Python:
num = int(input("Enter a decimal integer: "))
temp = num
bin = ""
while num > 0:
bin = str(num%2)+bin
num//=2
print(str(temp)+" in binary is "+str(bin))
Explanation:
This prompts the user for a decimal number
num = int(input("Enter a decimal integer: "))
This assigns the input number to a temporary variable
temp = num
This initializes the binary output to an empty string
bin = ""
This loop is repeated while num is greater than 0
while num > 0:
This appends the remainder of num divided by 2 to the front of the binary variable bin
bin = str(num%2)+bin
This calculates the floor division of num and 2
num//=2
This prints the required output
print(str(temp)+" in binary is "+str(bin))
Answer:
to check to see if some expression is true, and if it is do something, otherwise do something else. An if/else statement requires you to define an expression that evaluates to true or false.
Explanation:
Answer:
Input example:
select the funcion: 1
write the 1sd number2
write the 2nd number1
value is 2.000000
Explanation:
#include <stdio.h>
main()
{
//define the variables as float
float a, b, c, e;
char d;
while (1)
{
//input values
printf("select the function: ");
scanf("%c",&d);
printf("write the 1sd number");
scanf("%f",&a);
getchar();
printf("write the 2nd number");
scanf("%f",&b);
getchar();
if (d=='%')
{
a=a*b/100;
}
if (d=='*')
{
a=a*b;
}
if (d=='+')
{
a=a+b;
}
if (d=='/')
{
a=a/b;
}
if (d=='-')
{
a=a-b;
}
printf("value is %f \n",a);
}
printf("final value is %f",a);
getchar();
}
The first %d is the result of num 1 /bum 2
Answer: Scope creep
Explanation:
Scope creep in the project management basically refers to the uncontrolled development or growth in the project creep. It basically occur when the project scope are not appropriately defined.
It usually involve lack of change in the control system and increase the complexity of the project. It is also has poor requirement analysis.
So, that is why it is the biggest problem we usually face in the project management.