Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
suyashi29
GitHub Repository: suyashi29/python-su
Path: blob/master/Python core/Lab1-Practice questions on Python core.ipynb
3074 views
Kernel: Python 3

Q1: User input a string "A" having with length 10

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)

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

Q4: Write a script to generate & print dictonary via user input, keys must be in numbers and values in strings¶

Q5: Write Script that accepts a sentence and calculate the number of letters and digits.

Q6: Write a Script to merge two lists into a dictionary

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

Q8: Use a loop to display elements from a given list which are present at even positions