Question: Create 4 variables with distinct data types: Task 2 -Ask the user for their age -Convert the input into an integer data type Task 3

Create 4 variables with distinct data types:

Task 2
-Ask the user for their age
-Convert the input into an integer data type

Task 3
-Ask the user for the temperature
-Convert the input into an integer float type

Task 4
-Ask the user for 2 numbers
-Output the sum, product, quotient, and difference of the numbers

Task 5
-Output your first & last name using the print() method. Separate the two text by a tab character
-Complete this task in two unique, distinct ways

Task 6
-Ask the user for a text
-Ask the user for a number
-Typecast the number into an integer
-Output both the text and number using string formatting

Task 7
-Using the plus symbol, add two strings, integers, floats, and boolean values together. (using 4 print statements)
-Using a comment, state your observations

Task 8
-Using the round() method, round the following float values
1.235 to two decimal places
2.45 to one decimal place
3.97531 to six decimal places
-Using a comment, state your observations

Step by Step Solution

3.43 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Here the python code is written to solve the given problem Code Task 1 var1 Hello var2 50 ... View full answer

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!