Question: Part 2 : Exploring Variable. Types and Assignments in Python Obj tive: Instructions: String Variables: Create two string variables: first _ name and last _

Part 2: Exploring Variable. Types and Assignments in Python
Objtive:
Instructions:
String Variables:
Create two string variables: first_name and last_name.
Assign your own first and last name to these variables.
Concatenate the strings to create a full name and print it.
Integer and Float Variables:
Create two variables: height_cm and weight_kg.
Assign your height in centimeters and weight in kilograms to these variables.
Calculate your BMI using the formula: BMI = weight_kg /(height_cm/100)**2.
Print your BMI.
Boolean Variables:
Ceate a variable ca!ed is_student and assign it the value True.
eate another variable called has_graduated and assign it the value False.
Yrint both variables.
Changing Variable Types:
: Create a variable number_str and assign it a string value "123".
Convert number_str to an integer and store it in a variable called number_int.
Print both number_str and number_int to show the difference.
Part 2 : Exploring Variable. Types and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!