Popcorn Hack


Book = input("Enter your Favorite Book: ")
author = input("Enter the authors name: ")
name  = input("Enter your name: ")

sentence = "Your favorite book is " + Book + " by the author " +  author + " and your name is " + name + ". "
print(sentence)


HomeWork Hack 1


// Data
let fullName = "Soni Dhenuva";
let age = 15;
let email = "soni.dhenuva@gmail.com";
let hobby = "Painting";
let pets = "Dog";

// Generate unique ID: Use the first 3 characters of the last name, reverse the age, and add a random special character
let lastNameStart = fullName.split(" ")[1].substring(0, 3);  // "Dhe"
let reversedAge = age.toString().split("").reverse().join("");  // "15"

// Generate a random special character from a predefined list
let specialCharacters = "!@#$%^&*()_+{}[]<>?";
let randomChar = specialCharacters.charAt(Math.floor(Math.random() * specialCharacters.length));

// Create the unique ID
let uniqueId = lastNameStart + reversedAge + randomChar;  // "Dhe15!"

// Output the information
console.log(formattedInfo);