You are on page 1of 4

DIGITAL ASSIGNMENT

SUBJECT: PROBLEM SOLVING IN PYTHON


COURSE CODE: CSE1001

NAME: CHARAN
REGNO: 19BBS0094

FLOW CHARTS
CODE -1

// NAME: CHARAN
// REGNO: 19BBS0094
import math
x, y = int(input('Enter Value of x: ')), int(input('Enter Value of
y: '))
print('{}+{} = {}'.format(x, y, x+y))
print('{}-{} = {}'.format(y, x, y-x))
print('{}x{} = {}'.format(x, y, x*y))
print('{}/{} = {}'.format(x, y, x//y))
print('{}%{} = {}'.format(x, y, x % y))
print('log {} to the base 10 = {}'.format(x, math.log10(x)))
print('{}^{} = {}'.format(x, y, x**y))

CODE -2
# NAME: CHARAN SRIDHAR BHOGARAJU
# REGNO: 19BBS0094
length = float(input("Enter the length of the room in m: "))
width = float(input("Enter the width of the room in m: "))
area = length*width
print("Area of the room is {:.4f} m square".format(area))
CODE -3
# NAME: CHARAN SRIDHAR BHOGARAJU
# REGNO: 19BBS0094
length = float(input("Enter the length in feet: "))
width = float(input("Enter the width of the field in feet: "))
area = length*width
area = area/43560
print("Area in acres is : {:.4f}".format(area))

CODE -4
# NAME : CHARAN
# REGNO: 19BBS0094
costOfMeals = float(input("Enter the total cost: "))
taxAmount = 0.05*costOfMeals
tipAmount = 0.18*costOfMeals
print("Tax: {:.2f}".format(taxAmount))
print("Tip: {:.2f}".format(tipAmount))
total = costOfMeals+taxAmount+tipAmount
print("Total cost: {:.2f}".format(total))

You might also like