Question: Part 2 : Exploring Variable. Types and Assignments in Python Obj tive: Instructions: String Variables: Create two string variables: first _ name and last _
Part : Exploring Variable. Types and Assignments in Python
Objtive:
Instructions:
String Variables:
Create two string variables: firstname and lastname.
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: heightcm and weightkg
Assign your height in centimeters and weight in kilograms to these variables.
Calculate your BMI using the formula: BMI weightkg heightcm
Print your BMI.
Boolean Variables:
Ceate a variable caed isstudent and assign it the value True.
eate another variable called hasgraduated and assign it the value False.
Yrint both variables.
Changing Variable Types:
: Create a variable numberstr and assign it a string value
Convert numberstr to an integer and store it in a variable called numberint.
Print both numberstr and numberint to show the difference.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
