Skip to content

Commit 3611f90

Browse files
committedApr 9, 2024
second commit
1 parent 551fa21 commit 3611f90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+833
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Write a program that asks the user to provide a number and prints either odd number or even number based on the user input.
2+
3+
user_number = int(input('Provide a number: '))
4+
5+
if user_number % 2 == 0:
6+
print('even number')
7+
else:
8+
print('odd number')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# John earns $10 per hour for the first 160 hours in a given month. For any additional hour, he earns $15 per hour. Write a program that accepts an integer number of hours worked in a given month and prints John's total earnings.
2+
3+
hours = int(input('Provide the number of hours worked in a month: '))
4+
5+
if hours > 160:
6+
total = 10 * 160
7+
hours = hours - 160
8+
total = total + 15 * hours
9+
print(total)
10+
else:
11+
print(10*hours)

0 commit comments

Comments
 (0)
Please sign in to comment.