Automated grading of homework assignments and tests
- fork this repository
- solve the task
- commit with proper message
A variable of type string is given. Find its length.
Example 1:
Input: a="python"
Output: 6
Constraints:
A string type variable is given. Return True if its length is even. Return False if its length is odd.
Example 1:
Input: a="code"
Output: True
String type variables a and b are given. Return True if the length is equal. If not equal, return False.
Example 1:
Input: a="code" b="exam"
Output: True
Example 2:
Input: a="code" b="python"
Output: False
A string variable s is given. Return the "*" sign that is equal to the length of this variable.
Example 1:
Input: a="code"
Output: "****"
Given two strings, s1 and s2. Find their total length.
Example 1:
Input: s1="code" s2="python"
Output: 10
Given two strings, s1 and s2. Return the shortest length between them.
Example 1:
Input: s1="code" s2="python"
Output: "code"
Example 2:
Input: s1="code" s2="exam"
Output: "exam"
Given three strings, s1, s2 and s3. return their odd lengths, example "[s1, s2]". If there is no odd length, return "[]".
Example 1:
Input: s1="code" s2="python" s3="coder"
Output: "[coder]"
Example 2:
Input: s1="codeschool.uz" s2="example" s3="python"
Output: "[codeschool.uz, example]"
Given variable type string s. Return the character in the muddle. If the length is even, return two characters in the middle.
Example 1:
Input: s = "abcdf"
Output: "c"
Example 2:
Input: s = "cool
Output: "oo"
Constraints:
- 2 < len(s)
Given two non-negative integers, num1 and num2 represented as string. Return the sum of num1 and num2 as a string.
Example 1:
Input: num1 = "12", num2 = "5"
Output: "17"
Example 2:
Input: num1 = "425", num2 = "81"
Output: "506"
Constraints:
- 1 <= len(num1), len(num2) <= 10^4
A string of length three is given. Check that it is a palindrome. Return True if the palindrome is False otherwise.
Example 1:
Input: s = "cff"
Output: False
Example 2:
Input: s = "dcd"
Output: True
Constraints:
- len(s) == 3
- don't copy other solutions or any solution
- don't remove comments