-
Pavatharni . S wrote a new item 2 years, 6 months ago
# importing package import turtle # use forward by 50 (default = black) turtle.forward(50) # change the color of turtle turtle.color(“red”) # use forward by 50 (color = red) turtle.forward(50)
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# initialize the amount variable amount = 10000 # check that You are eligible to # purchase Dsa Self Paced or not if(amount > 2999) print(“You are eligible to purchase Dsa Self Pa ced”)
-
Pavatharni . S wrote a new item 2 years, 6 months ago
num = float(input(“Enter a number: “)) if num > 0: print(“Positive number”) elif num == 0: print(“Zero”) else: print(“Negative nu mber”)
-
Pavatharni . S wrote a new item 2 years, 6 months ago
import math class circle(): def __init__(self,radius): self.radius=radius def area(self): return math.pi*(self.radius**2) def perimeter(self): return 2*math.pi*self.radius r=int(input(“Enter radius of […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# First product method. # Takes two argument and print their # product def product(a, b): p = a * b print(p) # Second product method # Takes three argument and print their # product def […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# function which return reverse of a string def isPalindrome(s): return s == s[::-1] # Driver code s = “malayalam” ans = isPalindrome(s) if ans: print(“Yes”) else: print(“No”)
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# Python3 program to illustrate # working of AND gate def AND (a, b): if a == 1 and b == 1: return True else: return False # Driver code if __name__==’__main__’: print(AND(1, […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# Python3 program to find XOR of ASCII # value of characters in string # Function to find the XOR of ASCII # value of characters in string def XorAscii(str1, len1): # store value of first character ans […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
# Python code to demonstrate the working of gcd() # importing “math” for mathematical operations import math # prints 12 print(“The gcd of 60 and 48 is : “, end=””) print(math.gcd(60, 48))
-
Pavatharni . S wrote a new item 2 years, 6 months ago
#include void main( ) { FILE *fp ; char ch ; fp = fopen(“file_handle.c”,”r”) ; while ( 1 ) { ch = fgetc ( fp ) ; if ( ch == EOF ) break ; printf(“%c”,ch) ; } fclose (fp ) ; }
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C program to swap two variables #include // Driver code int main() { int x, y; printf(“Enter Value of x “); scanf(“%d”, &x); printf(“nEnter Value of y “); scanf(“%d”, &y); int temp = x; x = […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C# program to create marksheet for students. using System; using System.Collections.Generic; using System.Linq; using System.Text; class GFG{ static void Main(string[] args) { // Declare […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C code to demonstrate the working of // strrchr() #include #include // Driver function int main() { // initializing variables char st[] = “GeeksforGeeks”; char ch = ‘e’; char* val; // […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C program to print right half pyramid pattern of star #include int main() { int rows = 5; // first loop for printing rows for (int i = 0; i < rows; i++) { // second loop for printing character […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
#include using namespace std; int solveWordWrapUsingMemo(int words[], int n, int length, int wordIndex, int remLength, vector memo); int square(int n) { return n * n; } int solveWordWrapUtil(int […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C Program to demonstrate // Sum of Natural Numbers // using while loops #include int main() { int i, s = 0; int n = 10; i = 1; // while loop executes // the statements until the // condition […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C program to find Armstrong number #include /* Function to calculate x raised to the power y */ int power(int x, unsigned int y) { if (y == 0) return 1; if (y % 2 == 0) return power(x, y / 2) * […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
#include int main() { int A, B, C; printf(“Enter the numbers A, B and C: “); scanf(“%d %d %d”, &A, &B, &C); if (A >= B && A >= C) printf(“%d is the largest number.”, A); if (B >= A && B >= […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
// C program to demonstrate syntax of binary arithmetic // operators #include int main() { int a = 10, b = 4, res; // printing a and b printf(“a is %d and b is %dn”, a, b); res = a + b; // […]
-
Pavatharni . S wrote a new item 2 years, 6 months ago
provide a dynamic way to move from one slide to the next during a slide show
- Load More
