Solutions in python: # METHOD1:- By creating function and taking only one string input at one time #creating a function taking argument def virus_check(str1): # Checking if the string has enough characters to compare at index position 0, 2, and 4 if len(str1)>4 and str1[0]==str1[2]==str1[4]: print(1) else: print[0] # METHOD2:-By taking every testcases in one time by for loop # Number of test cases as input n = int(input("Enter number of test cases: ")) # Iteration by for loop through each test cases for _ in range(n): str1 = input("Enter string: ") # Check if the string has enough characters to compare at index position 0, 2, and 4 if len(str1) > 4 and str1[0] == str1[2] == str1[4]: print(1) else: print(0)
For cracking materials
inbox me - instagram.com/tekno.uf
Or say hi at - t.me/ubkannaa
How many test cases are there in coding?
10
Solutions in python:
# METHOD1:- By creating function and taking only one string input at one time
#creating a function taking argument
def virus_check(str1):
# Checking if the string has enough characters to compare at index position 0, 2, and 4
if len(str1)>4 and str1[0]==str1[2]==str1[4]:
print(1)
else:
print[0]
# METHOD2:-By taking every testcases in one time by for loop
# Number of test cases as input
n = int(input("Enter number of test cases: "))
# Iteration by for loop through each test cases
for _ in range(n):
str1 = input("Enter string: ")
# Check if the string has enough characters to compare at index position 0, 2, and 4
if len(str1) > 4 and str1[0] == str1[2] == str1[4]:
print(1)
else:
print(0)
Ur xm date?
@@teknouf this December
Can we use python to code in the coding round?
Kindly chk with ur tnp cell or chk ur mail, pyth may not be allowed
kindly reply as soon as possible
no