Strings Test a
star
star
star
star
star
Last updated over 1 year ago
20 questions
1
What is output by the following code?s = "dog food";print( s )
What is output by the following code?
s = "dog food";
print( s )
1
What is output by the following code?s = "www.apluscompsci.com";print( s )
What is output by the following code?
s = "www.apluscompsci.com";
print( s )
1
What is output by the following code?s = "dog";print( len(s) )
What is output by the following code?
s = "dog";
print( len(s) )
1
What is output by the following code?s = "dog food";print( len(s) )
What is output by the following code?
s = "dog food";
print( len(s) )
1
What is output by the following code?s = "www.apluscompsci.com";print( len(s) )
What is output by the following code?
s = "www.apluscompsci.com";
print( len(s) )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[0] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[0] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[1] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[1] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[4] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[4] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[5] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[5] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[0:2] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[0:2] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[2:5] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[2:5] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[0:0] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[0:0] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[0:1] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[0:1] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[:-2] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[:-2] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[8:-2] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[8:-2] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s[8:-4] )
What is output by the following code?
s = "www.apluscompsci.com";
print( s[8:-4] )
1
What is output by the following code?s = "www.apluscompsci.com";print( s.find("s") )
What is output by the following code?
s = "www.apluscompsci.com";
print( s.find("s") )
1
What is output by the following code?s = "www.apluscompsci.com";print( s.rfind("s") )
What is output by the following code?
s = "www.apluscompsci.com";
print( s.rfind("s") )
1
What is output by the following code?s = "www.apluscompsci.com";print( s.find("x") )
What is output by the following code?
s = "www.apluscompsci.com";
print( s.find("x") )
1
What is output by the following code?s = "www.apluscompsci.com";print( s.rfind("co") )
What is output by the following code?
s = "www.apluscompsci.com";
print( s.rfind("co") )