Members of Popcorn Hack 1 are: Anvay Vahia Rayhaan Sheeraj Kiruthic Selvakumar Pranav Santhosh Yuva Bala
#Popcorn Hack 2
fruits = {
"apple": {
"color": "red",
},
"banana": {
"color": "yellow",
},
"cherry": {
"color": "red",
},
"orange": {
"color": "orange",
"taste": "citrus",
}
}
print("Here are some fruits with descriptions,", fruits)
Here are some fruits with descriptions, {'apple': {'color': 'red'}, 'banana': {'color': 'yellow'}, 'cherry': {'color': 'red'}, 'orange': {'color': 'orange', 'taste': 'citrus'}}
// Homework Hack #1
const fruitName = "Apple";
// Define a variable for the fruit color
let fruitColor = "Red";
// Define a variable for the fruit taste
let fruitTaste = "Sweet";
// Values of the variables to the console
console.log("Fruit Name:", fruitName);
console.log("Fruit Color:", fruitColor);
console.log("Fruit Taste:", fruitTaste);
// Function to create a sentence from the fruit descriptions
function describeFruit(name, color, taste) {
return `The ${name} is ${color} and tastes ${taste}.`;
}
console.log(describeFruit(fruitName, fruitColor, fruitTaste));
# Homework Hack 2
# Define the scores as variables
score1 = 95
score2 = 90
score3 = 98
score4 = 92
score5 = 88
score6 = 100
score7 = 94
# Calculate the total score
total_score = score1 + score2 + score3 + score4 + score5 + score6 + score7
# Calculate the number of scores
number_of_scores = 7
# Calculate the average grade
average_grade = total_score / number_of_scores
# Define student name and age
student_name = "Rayhaan Sheeraj"
student_age = 15
# Create a list containing student information
student_info = [student_name, student_age, average_grade]
# Print the scores
print("Scores:", score1, score2, score3, score4, score5, score6, score7)
# Print the total score
print("Total Score:", total_score)
# Print the average grade
print("Average Grade:", average_grade)
# Print the student information list
print("Student Info:", student_info)
Scores: 95 90 98 92 88 100 94
Total Score: 657
Average Grade: 93.85714285714286
Student Info: ['Rayhaan Sheeraj', 15, 93.85714285714286]