Lab 1, 2
Lab 1, 2
Exercises
Exercise 1: Simple Variable Assignment
1. Declare two string variables, first_name and last_name, and assign your first and last names.
2. Concatenate the two strings and store the result in a variable full_name.
3. Print the full_name variable.
1. Declare a Boolean variable is_adult and assign True if you are above 18, otherwise False.
2. Print the value of the is_adult variable.
1. Create a Python program that converts temperatures between Celsius and Fahrenheit.
2. Prompt the user to enter a temperature and its unit (Celsius or Fahrenheit).
3. Convert the temperature to the other unit and display the result.
4. Allow the user to choose whether to perform another conversion.
1. Write a Python program that checks whether a given year is a leap year.
2. Prompt the user to enter a year.
3. Display whether the entered year is a leap year or not.
4. Implement additional checks, such as ensuring the user enters a positive integer.