Qna on python
- In example i give you a variable with string assign (oslo). Now you have to Cut first two letters from the string value (i.e. oslo --> lo) then add two letters at the end (i.e. lo --> lose) and then add a space beetween them to make 2 words print the result (lo se) and add a space bettween them that makes 2 words from one and after print the first letter form left side must be capitalize (i.e. Lo se). But remember including with the given variable your program can have maximum 3 lines long and you can't create a new variable neither can edit the value of string of given string.
Quc. : variable = ('Laptop') now remove first three letters from the variable (i.e. Laptop --> top) make the first caracter capital (top) (i.e. top --> Top) and add three letters at the end with a space (i.e. top --> top one) that make 2 words from one and add single quotation mark ( ' ) at left on (Top) (i.e. 'Top) and add double quotation mark ( " ) at right (one) (i.e. one") when the it will be printout on display the print should be same as this ('Top one")
Uncomplex : In simple word i am giving you ( variable = 'Laptop') and i want to get printout ('Top one") and maximum line of program is 3 and you cannot edit the string or neither add a new variable
...
- i. Guide the user to enter the sentence "These beans are grown up on our land"
ii. Take that input and find the word 'grown' (using find function)
iii. print the position of 'grown' by letters count
iv. The printout should be like this "The word (grown) is stand in number 17 by letters count"
Note : You can't just simply print the result like this print ("The word (grown) is stand in number 17 by letters count")
Dis : you have to take input then find the word then convert the int to str then print (you can just have 4 lines maximum)
Disclamer : In this repository you can find Qna question to sharp your brain (maybe). For learn python from you can read Doc from https://doc.python.org/ or book from https://realpython.com/ or from anywhere you want (the python book i use is from realpython (4th edition) {this is not any promotion}) or i have another repository contains files from that book exercise where i document even comment almost in eveyline of code https://github.com/zaynkhan100110/python-for-beginner/ .
Contribute : If anyone wants (since this material is for learning) then they can contribute.
Good Luck