Jan-30-2020, 04:58 PM
hey i am new to python and i am having some issues with my code.
This code as it is runs but it prints "Please enter a valid name" for an infinite number of times.
Thnakyou in advance for your help.
Also our sir has told us not to use any in built functions. Including the for loop. We can only use while if etc
string = '' length = 0 input_name = input("Enter your name: ") length = len(input_name) moving_point = 0 ascii_value = 3 while moving_point != length: asii_value = int(ord(input_name[moving_point])) if ascii_value >= 65 and ascii_value<= 90 or ascii_value >=97 and ascii_value <= 122: moving_point += 1 else: print("Please insert a valid name")By the way thi code is to make sure that a person cant enter an invalid name like having any symbols or numbers.
This code as it is runs but it prints "Please enter a valid name" for an infinite number of times.
Thnakyou in advance for your help.
Also our sir has told us not to use any in built functions. Including the for loop. We can only use while if etc