Skip to content

Commit 6c1ee03

Browse files
authored
Merge pull request #2 from Diananansubuga/Diana-Nansubuga-S22B23/009-A98593
Diana nansubuga s22 b23/009 a98593
2 parents 442987d + 95e1436 commit 6c1ee03

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

day2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
print("Hello World")
2+
name=input("Please enter Your Name: ")
3+
print("hello",name)

diananansubuga S22B23009/day1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Imagine a right triangle:
2+
3+
# Read a number from the standard input and assign it to a
4+
# Read another number from the standard input and assign it to b
5+
# Use Pythagoras theorem to determine the value of the long side c
6+
# Use string formatting to print out the length of the long side
7+
# If c is larger than PI (a constant), also print out: And this is longer than PI
8+
pi=3.14
9+
a=float(input("input the value of side a"))
10+
b=float(input("input the value of side b"))
11+
c=(a**2+b**2)**0.5
12+
print("the length of c is:",c)
13+
if c>pi:
14+
print("and is longer than pi")
15+

diananansubuga S22B23009/day1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# print hello world
2+
print(" Hello World")
3+
# write code that asks the user to enter his/her name and print hello, username
4+
name=input("Please enter your name")
5+
print("hello",name)

0 commit comments

Comments
 (0)