Doubtly
@Doubtly · Joined Feb 2021
- Answers
- 3,792
- Questions
- 7,778
- Upvotes received
- 432
- Python Program to Swap Two Variables x = input('Enter value of x: ') y = input('Enter value of y: ') # create a temporary variable and swap the values temp = x x = y y = temp pr... 1
- Python Program to Solve Quadratic Equation import cmath a = 1 b = 5 c = 6 # calculate the discriminant d = (b**2) - (4*a*c) # find two solutions sol1 = (-b-cmath.sqrt(d))/(2*a) sol2 =... 1
- Python Program to Calculate the Area of a Triangle a = float(input('Enter first side: ')) b = float(input('Enter second side: ')) c = float(input('Enter third side: ')) s = (a + b + c) / 2 ar... 1
- Python Program to Find the Square Root num = float(input('Enter a number: ')) num_sqrt = num ** 0.5 print('The square root of %0.3f is %0.3f'%(num ,num_sqrt)) 1
- Python Program to Add Two Numbers num1 = 1.5 num2 = 6.3 sum = num1 + num2 print('The sum of {0} and {1} is {2}'.format(num1, num2, sum)) 1
- Python Program to Print Hello world! print('Hello, world!') 2
- Distinguish between Electrolytic cell and Voltaic Cell Characteristic Electrolytic Cell Voltaic Cell Purpose To drive a non-spontaneous chemical reaction by using an external electrical energy so... 2
- Q1) Define a) corrosion b) electrode potential c) electrochemical cell d) wavelength e) electroplating a) corrosion Destruction or deterioration or disintegration of a metal by chemical or electrochemical reaction with its environment is calle... 2
- Write a program to find the largest of n numbers taken from user, using a function the array of numbers must #include<stdio.h> #include<conio.h> void main() { int n,i,a[100],large; int largest (int a[], int n); clrscr(); printf("Enter the number of... 1
- Explain different storage classes. The different locations in the computer where we can store data and their accessibility, initial values etc. vary based on the way they are... 2
- Write a program to find the LCM of two number using functions. #include <stdio.h> #include <conio.h> int get_lcm( int a, int b); // function declaration int main() int n1, n2, lcm; // declaration of vari... 1
- Explain the top down approach and bottom up approach to prepare nanomaterials. Top-down approach: In Top-down approach a bulk solids are dis-assembled that is broken or dissociated into finer pieces until the particles... 1
- Write a program to store the name, runs, scored and wickets taken of n cricketer #include<stdio.h> struct cricketer int runs,wickets; char name[25]; player[100],t; void main() int i,j,n; printf("Enter the no of cricket pl... 1
- Comparison between union and structure S.no C Structure C Union 1 Structure allocates storage space for all its members separately. Union allocates one common storage space for al... 1
- Comparison between array and structure. Sr. No. Key Structure Array 1 Definition Structure can be defined as a data structure used as container which can hold variables of differen... 1
- Why should I use functions at all? There are two reasons for using functions: (a) Writing functions avoids rewriting the same code over and over. Suppose you have a section of... 1
- What is more efficient, a switch statement or an if-else chain? As far as efficiency is concerned there would hardly be any difference, if at all. If the cases in a switch are sparsely distributed the com... 1
- What is size_t ? in c programming It is the type of the result of the sizeof operator. size_t is used to express the size of something or the number of characters in somethin... 1