0% found this document useful (0 votes)
71 views

Which of The Following Are Valid in Python Identifiers

The document lists 20 programming questions related to Python concepts like variables, data types, conditionals, loops, functions, strings, lists, tuples, files and more. It includes questions about reading input, performing calculations, manipulating strings, merging/reversing strings, checking for substrings, slicing strings, removing duplicates, and analyzing files. Many questions involve taking user input, processing or manipulating data, and displaying output.

Uploaded by

sathya priya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Which of The Following Are Valid in Python Identifiers

The document lists 20 programming questions related to Python concepts like variables, data types, conditionals, loops, functions, strings, lists, tuples, files and more. It includes questions about reading input, performing calculations, manipulating strings, merging/reversing strings, checking for substrings, slicing strings, removing duplicates, and analyzing files. Many questions involve taking user input, processing or manipulating data, and displaying output.

Uploaded by

sathya priya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Which of the following are valid in Python identifiers?

1. 123total
2. total123
3. java2share
4. ca$h
5. _abc_abc_
6. def
7. if

2. Read two numbers from the keyboard and print minimum value
using if-else statement.
3. Write a Python Program to find Area of Circle pi*r**2 using
import function.
4. Write a Program to read Employee Data from the Keyboard and
print that Data.
5. How to read multiple values from the keyboard in a single line.
6. Write a Program to accept list from the keyboard on the display.
7. Write a Program to check whether the given Number is in
between 1 and 100?
8. Write a Program to take a Single Digit Number from the Key
Board and Print is Value in English Word?
9. Write a Program to display *'s in Right Angled Triangles Form.
10. Write a Program to display *'s in Pyramid Style (Also known as
Equivalent Triangle)
11. Write a Program to accept some String from the Keyboard and
display its Characters by Index wise (both Positive and Negative
Index)
12. Slicing case study
1) S = 'abcdefghij'
2) s[1:6:2]
3) s[::1]
4) s[::-1]
5) s[3:7:-1]
6) s[7:4:-1]
7) s[0:10000:1]
8) s[-4:1:-1]
9) s[-4:1:-2]
10) s[5:0:1]
11) s[9:0:0]
12) s[0:-10:-1]
13) s[0:-11:-1]
14) s[0:0:1]
15) s[0:-9:-2]
16) s[-5:-9:-2]
17) s[10:-1:-1]
18) s[10000:2:-1]
13. Program to display all Positions of Substring in a given Main
String.
14. Program to Reverse Order of Words.
15. Program to Merge Characters of 2 Strings into a Single String
by taking Characters alternatively.
16. Write a Program to Remove Duplicate Characters from the
given Input String?
Input: ABCDABBCDABBBCCCDDEEEF
Output: ABCDEF
17. Write a Program to perform the following Task?
Input: 'one two three four five six seven'
Output: 'one owt three ruof five xis seven'
18. Write a Program to display Unique Vowels present in the given
Word?
19. Write a Program to take a Tuple of Numbers from the Keyboard
and Print its Sum and Average?
20. Program to print the Number of Lines, Words and Characters
present in the given File?

You might also like