i am sam
what is string
In python, type the following into a document. NOTE: Sentences following a # symbol are comments, and are not necessary for the program to run. #!/usr/bin/python #This program takes a input from a user and reverses it. number = input("Type a number: ") #This takes input from a user. a = len(number) #This finds the length of the number reverse = "" #This sets the variable reverse to an empty string. for i in number: a = a-1 #The places in a string start from 0. The last value will be the length minus 1.reverse = reverse + number[a] #Makes the number's last digit the new string's first. print("The reverse of", number, "is", reverse + ".") #prints the resulting string. This program will take any sequence of characters and reverse them. The final value is a string, but if an integer is needed, one needs only to add the line reverse = int(reverse) above the print statement. However, this will stop the program from being able to reverse strings, as it is not possible to convert a string to an integer if it is not a number.
Yes.
Not possible through html. Use php strrev function. For eg:
wefwfe
To write a program in Python that reverses a number, you can convert the number to a string, reverse the string, and then convert it back to an integer. Here's a simple example: def reverse_number(num): return int(str(num)[::-1]) number = 12345 reversed_number = reverse_number(number) print(reversed_number) # Output: 54321 This function takes an integer input, reverses its digits, and returns the reversed number.
write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)
i dont no string for servlate
Use for loop declare string array str[] and string variable l= string length of string array j=l for i=0 to i=l/2 then temp=str[i] str[i]=str[j-1] str[j-1]=temp j=j-1 now print str array it will be reversed
This is an assignment not a question.
what is if(!(str[i]==32))
In Windows, use notepad.exe; in linux, use program xedit.