This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Serial Keys: | |
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD | |
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD | |
GV7N2-DQZ00-4897Y-27ZNX-NV0TD | |
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0 | |
GZ3N0-6CX0L-H80UP-FPM59-NKAD4 | |
YY31H-6EYEJ-480VZ-VXXZC-QF2E0 | |
ZG51K-25FE1-H81ZP-95XGT-WV2C0 | |
VG30H-2AX11-H88FQ-CQXGZ-M6AY4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(0,10): | |
for x in range(i,i+5): | |
print("*", end=' ') | |
print(" ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program2PrintSumOfElementsInTheArray : | |
# Python program to print the sum of elements in an array# | |
arr1=[1, 2, 3, 4, 2, 7, 8, 8, 3] | |
sum=0 | |
for i in range(0,len(arr1)): | |
sum+=arr1[i] | |
print(sum) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program2PrintTheLargestElementInTheArray : | |
# Python program to print the largest element in an array# | |
arr1=[1, 2, 3, 4, 2, 7, 8, 8, 3] | |
x= arr1[0] | |
for i in range(0,len(arr1)): | |
if arr1[i]>x: | |
x=arr1[i] | |
print(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program2PrintDuplicateValues : | |
# Python program to left rotate the elements of an array # | |
arr1=[1, 2, 3, 4, 2, 7, 8, 8, 3] | |
for i in range(0,len(arr1)): | |
for c in range(i+1,len(arr1)): | |
if arr1[i]==arr1[c]: | |
print(arr1[i]) | |
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class program2shit2left : | |
# Python program to left rotate the elements of an array # | |
arr1=[1,2,3,4,5,6,7] | |
n = int(input("Enter how many times to shift to the left :")) | |
for c in range(0,n): | |
temp= arr1[0] | |
for i in range(0,len(arr1)-1): | |
arr1[i]=arr1[i+1] | |
arr1[len(arr1)-1]=temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FrequencyOfEachElementInTheArray : | |
# Python program to find the frequency of each element in the array # | |
arr1=[1 , 2 ,8 ,3 , 2 , 2, 2 , 5 ,1 ] | |
arr2={} | |
for i in range(0,len(arr1)): | |
count=0 | |
for sub in arr1: | |
if arr1[i]==sub: | |
count+=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CopyAnArray2Another : | |
arr1=[1,2,3,4,5] | |
print(arr1) | |
e=0 | |
arr2=[None]*len(arr1) | |
for i in range(0,len(arr1)): | |
arr2[i]=arr1[i] | |
print(arr2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Convert2BiOcHex : | |
number = int(input("Please, enter a number to convert it :")) | |
print(bin(number)) | |
print(oct(number)) | |
print(hex(number)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SumNaturalNumbers : | |
natNum= int(input("Enter a Number to sum it's natural number :")) | |
while natNum<0: | |
print("Please, Enter a positive Number...") | |
natNum = int(input()) | |
sum=0 | |
while natNum>0: | |
sum+=natNum | |
natNum-=1 | |
print(sum) |
NewerOlder