2022-Spring: Lab 2.5 - Intro to Python

preview_player
Показать описание
Instructions:
1. Include standard comments for our class as comments:

Your Name 
Class + Section + Semester (CIS135 W01/W02 2022 Spring)
File Description

2. Include three variables: 

An integer with value 1 named var_first
A float with a value 10.10 named var_second
A variable named var_sum, which adds var_first and var_second
be sure to explicitly cast 'var_first' to a float before you assign the value to var_sum

3. Print the value of var_sum to the screen along with its data type

4. Use comments to describe what each section of code does

Except for step 1, since it is a comment itself it is self explanatory
Рекомендации по теме
Комментарии
Автор

For the second print statement we write print(type(var_sum), var_sum_2) or print (type(var_sum_2), var_sum_2). I see you use the same variable var_sum for both print.

tuanlevan