Buggy python submission (verdict: Runtime Error):
a=input() #len input
b=input() #string input
if len(b)>int(a): # if exceed the len given
    print(b[:int(a)],". . .")
else:
    print(c)

Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):

#DECLARE K AND S INPUT
K = int(input())
S = input()

str = S

#if same, no change
#IF bigger plus ...

if lens(S) > K:
       print(str[0:K]+"...")

else:
       print(str)

Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):
#need to use a raw input for one line input because they both defer in data types i.e interger and float
a,b = input().split()
#and then convert them back into respective data types
a=int(a)
b=float(b)
#multiply a and b and then round the answer up before printing
mul=a*b
ans=round(mul)
print(ans)


Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):
#firsts we declare string s and k, if character s is at most with char k, it will print char s, no change
#if s i more than k it
#time cpmlexity 0(1)


k = int(input())
s= input()

str = s

#if same, no change
if lens(s) == k:
                         print(s)

else:
         print (str[0:k] +"...")


Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):

while True:
     k = input()
     if 1 <= int(k) <= 100:
         break;
     print ('Error Invalid Input for K')

#Check constraint for K


while True:
     s = input().lower()
     if 1 <= len(s) <= 100:
         break;
     print ('Error Invalid Input for s')

#Check constraint for S

if len(s) > k:
    print(s[:k] + "...")
else:
    print(s)

Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):
K=int(input())
S= input()

if len(T) < K :
    print(S)

else:
    print (S[0:K]+'...')

Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):
# program to print the new string after performing append operation in the string s "..." 
# if only the character s is more than k but if the character s is at most k
# the output will not change
#first we will define the new string

k =int(input())
s = input()

str = s
dots = "..."
if len(S) == k:
print(S)
elif len(S) > k:
print (str[0:k],"...")



Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Buggy python submission (verdict: Runtime Error):
#input an interget
k=int(input())
#input an string
s=str(input())
#get the length of the string
x=int(len(s))
#get the difference in length between k and s
i=k-x

#if statement about how the string will function
#if the string is the same length as k then print it
if i==0:
    print(s)
#if not, append it
else:
    for i in range(x):
        s=s[0 : i : ] + s[i+1 : : ]
        for i in range(x):
            fix=str('.')
            lenfix=int(len(fix))=x

    print(s.append(fix))

Fixed submission:
# Take both input K & S, then compare the length of S with K and assign it to length
# If the length is <= K print all
# And if length is >K print some of the character

K = int(input())
S = input()

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")