© 2026 Hashnode
🔹 Question 1: Greet User Write a function called greet_user that takes a name as input and prints a greeting message like "Hello, Areeff!". 🔹 Question 2: Add Two Numbers Write a function called add_numbers that takes two numbers and returns their ...

List Exercises: Create and Access List Create a list called fruits containing "apple", "banana", "cherry", and "date". Print the second item in the list. Change the third item to "blueberry" and print the updated list. List Operations Given t...

Lab Practical 1: Introduction to Java Programming Objective: Write a simple Java program to print "Hello, World!" and compile/run it using the command line.Task: Write a Java program that prints "Hello, World!". Compile and run it using javac and j...

1. Print 1 to 10 Use a for loop to print numbers 1 to 10. 2. Sum of 1 to 100 Use a for loop to calculate the sum of numbers from 1 to 100. 3. Print Multiples of 3 (1–30) Print all multiples of 3 between 1 and 30. 4. Print Each Character Ask the user ...

🔹 Section 1: Variables, Output, Input Q1. Create and Display Create a variable called name and assign your name to it. Print: Hello, [name]! Q2. Simple Calculator Ask the user for two numbers. Add them and print the result. 🔹 Section 2: i...

1. Password Checker Keep asking until user enters "admin123". Then print “Access Granted”. 2. Countdown from N Ask for a number, then count down to 0. 3. Number Until Even Keep asking the user for a number until they enter an even number. 4. Sum Unti...
