Homework:
Write a program that takes two inputs and stores them in variables feet and inches. Print output of their height in centimeters. (12 inches = 1 foot, 1 inch = 2.54 centimeters)
What do these print?
(“99” - 8) % 6
int(5.8) + float(9) * 3
4 + int(“447”)
str(4) + “447”
str(bool(0)) + “ is the opposite of ” + str(bool(25))
Resources:
Class Slides: https://docs.google.com/presentation/d/1-N_NI0x7VWJPifcFJ5MhrdIM52iFB9Fq0ttRNVl9_YM/edit?usp=sharing VERY IMPORTANT YOU LOOK THROUGH THIS, IMPORTANT INFORMATION REGARDING CONTESTS!!
Class Code: main.py - Python-Week1Day2 - Replit
Contact info:
shravyassathish@gmail.com (mentor)
Make sure to "Add a comment" with your code to the homework in order to submit your homework assignment!
Recordings for class #2 have been sent out through email :)
#1)
feet = int(input("Type your height in feet: "))
inches = int(input("Type your height in inches: "))
cmFTHeight = feet * 30.48
cmINHeight = inches * 2.54
print("Your height in centimeters is " + cmFTHeight + " your height in inches is " + cmINHeight)
#2)
error
32.0
451
4447
False is the opposite of true