Sorting by alphabet
Write a program that receives a number of names from the input and then arranges them based on alphabetic letters and prints in the output
Write a program that receives a number of names from the input and then arranges them based on alphabetic letters and prints in the output
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
names = [] # List for names while True: # As long as name_user = input('please enter your names: ') # Get input from the user if name_user == '': break else: names.append(name_user) names.sort() print(names)
names_list = [] for i in range (10): names_list.append(input('Enter name : ')) names_list.sort() print(names_list)
names = [] while True: user_input = input("Please enter a name: (enter to exit)") if user_input == "": break else: names.append(user_input) names.sort() print(f"Sorted name => {names}")
names=[] while True: name = input("inter your names: ") if name.lower() == 'end': break names.append(name) print(sorted(names))
# Get names and sorting by alphabet x = input('please enter name with - seprator:') x = x.lower() # Sorting to size and small letters are sensitive x= x.split('-') x.sort() # Make sure you do not push the sorting command into the variable for item in x: print(item)
asami = [] while 1: names = input("please enter a name: ") if names == 0: break elif names.isalpha(): asami.append(names) else: print(sorted(asami))
list_names=[] while True: x=str(input("x: ")) list_names.append(x) if x=="": list_names.remove("") break abcd = sorted(list_names) print(abcd)
Submitting answers is currently unavailable.
Write a program that receives 2 dates in yyyy/mm/dd format and print 2 dates to the output for example Tarikh1: 1401/11/01 tarikh2: 1401/11/05 4 days Tarikh1: 1401/10/01 Tarikh2: 1401/11/05 34 Days
Write a program that receives a number from the input and increases the number 2 and prints in the output. This trend continues until the number 0 is not arrived
Write a program that receives a text and a word from the user, search the word in the text, and as the example below and then put the word * and print the text in the output. Example: Input1: Hello. My name is hooshang. I ...
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.