Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ex1 calendar #157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed src/__init__.py
Empty file.
74 changes: 74 additions & 0 deletions src/ex1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
'''
/* convert in python this code */

#include <iostream>
using namespace std;

int main()
{
int week;

/* Input week number from user */
cout << "Enter week number(1-7): " << endl;
cin >> week;

if (week == 1)
{
cout << "Monday" << endl;
}
else if (week == 2)
{
cout << "Tuesday" << endl;
}
else if (week == 3)
{
cout << "Wednesday" << endl;
}
else if (week == 4)
{
cout << "Thursday" << endl;
}
else if (week == 5)
{
cout << "Friday" << endl;
}
else if (week == 6)
{
cout << "Saturday" << endl;
}
else if (week == 7)
{
cout << "Sunday" << endl;
}
else
{
cout << "Invalid input! Please enter week number between 1-7." << endl;
}

return 0;
}
'''

x=input('Enter day of the week number(1-7): ')
day_of_week= int(x)

print('\n')

match day_of_week:
case 1:
print('its MONDAY\n')
case 2:
print('its TUESDAY')
case 3:
print('its WEDNESDAY')
case 4:
print('its THURSDAY')
case 5:
print('its FRIDAY')
case 6:
print('its SATURDAY')
case 7:
print('its SUNDAY')
case _:
print("Invalid input! Please enter week number between 1-7.\n")

2 changes: 0 additions & 2 deletions src/sum.py

This file was deleted.

Loading