Skip to content

Instantly share code, notes, and snippets.

View vtu27619's full-sized avatar

vtu27619

  • Joined Oct 25, 2025
View GitHub Profile
@vtu27619
vtu27619 / Task13.py
Created October 25, 2025 05:23
Likitha
import numpy as np
def simulate_coin_flips(n_flips):
"""
Simulates n_flips coin tosses.
'Heads' is represented by 1, and 'Tails' by 0.
@vtu27619
vtu27619 / Task12.py
Created October 25, 2025 05:08
Likitha
Task12a
# importing libraries
import pygame
import time
import random
@vtu27619
vtu27619 / Task11.py
Created October 25, 2025 05:06
Likitha
TASK 11A
import tkinter as tk
# Function to change font style
def change_font():
label.config(font=("Arial", 18, "bold"))
@vtu27619
vtu27619 / Task10.py
Created October 25, 2025 05:03
Likitha
Task10a
import matplotlib.pyplot as plt
languages = ['Java', 'Python', 'PHP', 'JavaScript', 'C#', 'C++']
popularity = [22.2, 17.6, 8.8, 8, 7.7, 6.7]
plt.bar(languages, popularity, color='b')
@vtu27619
vtu27619 / Task9.py
Created October 25, 2025 05:01
Likitha
TASK 9A
# Initialize the list of grades
grades = [85, 90, 78, 92, 88]
# Display the grades list
print("Grades List:", grades)
@vtu27619
vtu27619 / Task8.py
Created October 25, 2025 04:59
Likitha
Task8a
def number_sequence(start, end, step=1):
current = start
while current <= end:
yield current
@vtu27619
vtu27619 / Task7.py
Created October 25, 2025 04:57
Likitha
Task7a
def analyze_student_grades():
# Sample data
student_names = ["Alice", "Bob", "Charlie", "Diana"]
student_grades = [85, 92, 78, 90]
@vtu27619
vtu27619 / Task6.py
Created October 25, 2025 04:56
Likitha
Task6a
def copy_files(file_paths):
for file_path in file_paths:
if os.path.exists(file_path):
with open(file_path, 'r') as original_file:
@vtu27619
vtu27619 / Task5.py
Created October 25, 2025 04:54
Likitha
TASK 5A
def find_employee_by_id(employees, target_id):
for employee in employees:
if employee['id'] == target_id:
return employee
@vtu27619
vtu27619 / Task4.py
Created October 25, 2025 04:47
Likitha
Task4a
#Add Elements: Add elements to the list.
list=[10,20]
a=30
list.append(a)