Computer Science, asked by wess1234, 1 year ago

what is 2.4 Code Practice for Intro to CS - edhesive?

Answers

Answered by josiahpeters05
80

question 1: import math

x=int(input("Enter a number: "))

print (math.sqrt(math.fabs(x)))

int=x

question 2:import math

x=float(input("enter a number:"))

y=int(x)

x=x-y

print(math.fabs(x))

Answered by Jasleen0599
0

2.4 Code Practice for Intro to CS - edhesive

A program that takes as input the length of two pieces of fabric the total of their lengths in feet and inches (as whole numbers) and prints it.

feet1=int(input("Enter the feet: "))

inches1=int(input("Enter the inches: "))

feet2=int(input("Enter the feet: "))

inches2=int(input("Enter the inches: "))

total_inches=(feet1*12)+(feet2*12)+inches1+inches2

total_feet=total_inches//12

remainingInches=total_inches%12

print("Feet:  "+str(total_feet)+ "Inches: "+ str(reamainingInches))

#SPJ3

Similar questions