Path: blob/master/Python Basics/Lab1-Practice questions on Python core.ipynb
3074 views
Kernel: Python 3
- Q1: User input a string "A" and "B" having with length 10 and 5 res
- Q2 : Convert String A to upper case
Concadenate two strings A and B
len , index, Slicing (extract last 3 members)
In [ ]:
Q2: Create script to input two numbers x and y with following instruction:
add when user select 1, sub on 2, mul on 3, div 4 and power on 5(give options to select x^y or y^x)
In [ ]:
Q3: create a x tuple of size 6 and type cast it into list and stored result in variable b
in b insert a member at 2nd position
In [ ]:
Q4: Write a script to generate & print dictonary via user input, keys must be in numbers and values in strings¶
In [ ]:
Q5: Write Script that accepts a sentence and calculate the number of letters and digits.
In [ ]:
Q6: # Ask user to create a user name with len b/w 5-10, give 3 attempts,
end("Session Terminated")
In [ ]:
Q7: Script to check validity a password on following points
length b/w 6-15
atleast one Uppercase, lowercase, digit and symbol(@,#,&,%,$)
no space allowed
In [ ]:
Q8: Use a loop to display elements from a given list which are present at even positions
In [ ]: