Welcome

elif statements

Automated grading of homework assignments and tests

  • fork this repository
  • solve the task
  • commit with proper message
  • commit with proper message

Problems

if01

Find the largest of the numbers.

Example 1:

Input: a=1 b=4 c=2
Output: 4

Example 2:

Input: a=-5 b=-3 c=-1
Output: -1

Constraints:

  • -1018<=num<=1018

if02

Find the smallest of the numbers.

Example 1:

Input: a=1 b=4 c=2
Output: 1

Example 2:

Input: a=-5 b=-3 c=-1
Output: -5

Constraints:

  • -1018<=num<=1018

if03

Determine the number between large and small.

Example 1:

Input: a=3 b=7 c=1
Output: 3

Example 2:

Input: a=5 b=5 c=-1
Output: 5

Constraints:

  • -1018<=num<=1018

if04

Return zero if the numbers are equal, return the larger one if they are not equal.

Example 1:

Input: a=3 b=7
Output: 7

Example 2:

Input: a=5 b=5
Output: 0

Constraints:

  • -1018<=num<=1018

if05

Find the largest digit of the five-digit number.

Example 1:

Input: n=23546
Output: 6

Constraints:

  • -1018<=num<=1018

if06

Find the index of the largest digit of the five-digit number.

Example 1:

Input: n=76514
Output: 5

Example 2:

Input: a=54694
Output: 2

Constraints:

  • -1018<=num<=1018

if08

Return the days of the week, return the days of the week according to the numbers 1 to 7. Use the elif statments. 1: "Monday" 2: "Tuesday" 3: "Wednesday" 4: "Thursday" 5: "Friday" 6: "Saturday" 7: "Sunday"

Example 1:

Input: n=2
Output: "Tuesday"

Example 2:

Input: a=6
Output: "Saturday"

Constraints:

  • -1018<=num<=1018

Warning

  • don't copy other solutions or any solution
  • don't remove comments