0% found this document useful (0 votes)
3 views3 pages

Govind 1 PDF

The document outlines a practical assignment for a High Performance Computing course, focusing on the Google Colab platform and programming tasks in Python and C. It includes a Python program for searching an element in an array and a C program implementing the Quick Sort algorithm. Each section concludes with a brief explanation of the code's functionality and its simplicity.

Uploaded by

reddygovind4550
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Govind 1 PDF

The document outlines a practical assignment for a High Performance Computing course, focusing on the Google Colab platform and programming tasks in Python and C. It includes a Python program for searching an element in an array and a C program implementing the Quick Sort algorithm. Each section concludes with a brief explanation of the code's functionality and its simplicity.

Uploaded by

reddygovind4550
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Faculty of Engineering & Technology

Subject Name: High Performance Computing


Subject Code: 303105356
BTech-CSE (AI) 3rd Year 6th Semester

PRACTICAL: 01
Aim: Explore Google Colab Platform.
Introduction to Google Colab:
Google Colab is a free, cloud-based platform for writing and executing Python code, particularly
useful for data analysis, machine learning, and deep learning projects.

Exclusive Features of Google Colab:


• Free access to GPUs and TPUs
• Jupyter Notebook environment
• Real-time collaboration
• Integration with Google Drive
• Pre-installed popular Python libraries

Source Codes in Google Colab:


(1).Write a python program to search an element in given array.
Python Code:
def search_element(a,k):
for i in range(len(a)):
if a[i]==k:
return i
a=[1,2,3,4,5,6,7,8,9,10]
k=5
target_element=search_element(a,k)
print(target_element,k)

Name: KISTIPATI GOVINDREDDY


Enrollment No: 2203031240607 4
Division: 6AI8
Faculty of Engineering & Technology
Subject Name: High Performance Computing
Subject Code: 303105356
BTech-CSE (AI) 3rd Year 6th Semester

Output:

Conclusion:
The provided Python code demonstrates the searching an element among the given list
technique known for its simplicity and ease of implementation.

(2).Write a C program for sorting of n elements ,n must be greater than 5.


C Code:
%%writefile Govind_1.c
#include "stdio.h"
#include "stdlib.h"
int compare(const void* a, const void* b) {
return ((int)a - (int)b);
}
int main() {
int arr[] = { 99,55,66,90,88,77,1090,765,98765,6756 };
int n = sizeof(arr) / sizeof(arr[0]);
qsort(arr, n, sizeof(int), compare);
for (int i = 0; i < n; i++)
printf("%d ", arr[i]);
return 0;
}
Name: KISTIPATI GOVINDREDDY
Enrollment No: 2203031240607 5
Division: 6AI8
Faculty of Engineering & Technology
Subject Name: High Performance Computing
Subject Code: 303105356
BTech-CSE (AI) 3rd Year 6th Semester

Compilation and Execution Steps with Output:

Conclusion:
The provided C program demonstrates the Quick Sort algorithm, a straightforward and
intuitive sorting technique.

Name: KISTIPATI GOVINDREDDY


Enrollment No: 2203031240607 6
Division: 6AI8

You might also like