Replies: 1 comment
-
Github Discussions are not meant to be used to discuss problems with specific challenges. This kind of question should be asked either in kata discourse section, or in You can find some hinst related to your question in Codewars docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry guys, I dont know I ok with this problem.
Complete the function which returns the weekday according to the input number:
1 returns "Sunday"
2 returns "Monday"
3 returns "Tuesday"
4 returns "Wednesday"
5 returns "Thursday"
6 returns "Friday"
7 returns "Saturday"
Otherwise returns "Wrong, please enter a number between 1 and 7".
I wrote the following code:
def whatday(num):
if num == 1:
print("Sunday")
if num == 2:
print("Monday")
if num == 3:
print("Tuesday")
if num == 4:
print("Wednesday")
if num == 5:
print("Thursday")
if num == 6:
print("Friday")
if num == 7:
print("Saturday")
if num >= 8:
print("Wrong, please enter a number between 1 and 7")
and, in codewars i have the following output:
Who can teach me ? :)
Thanks
Beta Was this translation helpful? Give feedback.
All reactions