Skip to content

Commit ad10ff2

Browse files
committed
First Commit
0 parents  commit ad10ff2

17 files changed

+878
-0
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/python.iml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

basic.py

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# 6.union three set
2+
# a={5,12,52,0,8}
3+
# b={2,5,1,9,8}
4+
# c={4,5,6,0,10}
5+
# d=a.union(b,c)
6+
# print(d)
7+
8+
# 7.intersection of three set
9+
# a = {5, 2, 4, 5, 7, 1}
10+
# b = {5, 3, 11}
11+
# c = {4, 5, 12, 2, 1, 0}
12+
# print(a.intersection(b,c))
13+
14+
# 8. difference
15+
# a={23,5,1,12,4,6,7}
16+
# b={6,11,12,4,5,2,15,21,22,33}
17+
# c=a.difference(b)
18+
# print(c)
19+
20+
# 8.1 symmetric difference
21+
# a = {12, 2, 0, 3, 8}
22+
# b = {15, 10, 12, 3, 6}
23+
# c = a.symmetric_difference(b)
24+
# print(c)
25+
26+
# 9.Get number from user and display its tables
27+
# def table(nums):
28+
# for i in range(1, 11):
29+
# print(str(i) + "*" + str(nums) + "=" + str(i * nums))
30+
#
31+
#
32+
# num = int(input("enter the number:"))
33+
# table(num)
34+
35+
# 9.1 get two numbers from user and display a table
36+
# def table(nums,nums2):
37+
# for i in range(1, 11):
38+
# print(str(i) + "*" + str(nums) + "=" + str(i * nums))
39+
# print()
40+
# for j in range(1, 11):
41+
# print(str(j) + "*" + str(nums2) + "=" + str(j * nums2))
42+
#
43+
#
44+
# num = int(input("enter the number:"))
45+
# num2 = int(input("enter the number2:"))
46+
# table(num,num2)
47+
#
48+
# 10.1. get 6 subjects marks from the user
49+
# sub1=int(input("enter the mark"))
50+
# sub2=int(input("enter the mark"))
51+
# sub3=int(input("enter the mark"))
52+
# sub4=int(input("enter the mark"))
53+
# sub5=int(input("enter the mark"))
54+
# sub6=int(input("enter the mark"))
55+
# total=sub1+sub2+sub3+sub4+sub5+sub6
56+
# avg=total/600
57+
# print("total marks : "+str(total))
58+
# print("avg marks : "+str(avg))
59+
#
60+
# 10.2. get 6 subjects marks from the user with percentage
61+
# sub1=int(input("enter the mark "))
62+
# sub2=int(input("enter the mark "))
63+
# sub3=int(input("enter the mark "))
64+
# sub4=int(input("enter the mark "))
65+
# sub5=int(input("enter the mark "))
66+
# sub6=int(input("enter the mark "))
67+
# total=sub1+sub2+sub3+sub4+sub5+sub6
68+
# avg=total/6
69+
# print("total marks : "+str(total))
70+
# print("avg marks : "+str(avg)+"%")
71+
72+
# 11.1 get two numbers max number
73+
# n1=int(input("Enter the number: "))
74+
# n2=int(input("Enter the number: "))
75+
# if n1>n2:
76+
# print("1st number is greater that "+str(n1))
77+
# else:
78+
# print("2nd number is greater that " + str(n2))
79+
# print(max(n1,n2))
80+
81+
# 11.2 get three numbers max number
82+
# n1=int(input("Enter the number: "))
83+
# n2=int(input("Enter the number: "))
84+
# n3=int(input("Enter the number: "))
85+
# if n1>n2 and n1>n3:
86+
# print("1st number is greater that "+str(n1))
87+
# elif n2>n1 and n2>n3:
88+
# print("2nd number is greater that " + str(n2))
89+
# else:
90+
# print("3rd number is greater that " + str(n3))
91+
# print(max(n1,n2,n3))
92+
93+
# 12.1 star pattern
94+
# *
95+
# **
96+
# ***
97+
# ****
98+
# *****
99+
100+
# n=6
101+
# for i in range(n):
102+
# for j in range(i+1):
103+
# print("*",end=" ")
104+
# print()
105+
106+
# 12.2. Star pattern
107+
# *
108+
# **
109+
# ***
110+
# ****
111+
# *****
112+
# ******
113+
# n=6
114+
# space=n
115+
# for i in range(n):
116+
# for j in range(space+1):
117+
# print(end=" ")
118+
# for j in range(i+1):
119+
# print("*",end="")
120+
# print()
121+
# space=space-1
122+
123+
#
124+
# # Import the required module for text
125+
# # to speech conversion
126+
# from gtts import gTTS
127+
#
128+
# # This module is imported so that we can
129+
# # play the converted audio
130+
# import os
131+
#
132+
# # The text that you want to convert to audio
133+
# mytext = 'Features of Java Simple: Java is a simple language because its syntax is simple, clean, and easy to understand. Complex and ambiguous concepts of C++ are either eliminated or re-implemented in Java. For example, pointer and operator overloading are not used in Java. Object-Oriented: In Java, everything is in the form of the object. It means it has some data and behavior. A program must have at least one class and object. Robust: Java makes an effort to check error at run time and compile time. It uses a strong memory management system called garbage collector. Exception handling and garbage collection features make it strong. Secure: Java is a secure programming language because it has no explicit pointer and programs runs in the virtual machine. Java contains a security manager that defines the access of Java classes. Platform-Independent: Java provides a guarantee that code writes once and run anywhere. This byte code is platform-independent and can be run on any machine.'
134+
#
135+
# # Language in which you want to convert
136+
# language = 'en'
137+
#
138+
# # Passing the text and language to the engine,
139+
# # here we have marked slow=False. Which tells
140+
# # the module that the converted audio should
141+
# # have a high speed
142+
# myobj = gTTS(text=mytext, lang=language, slow=True)
143+
#
144+
# # Saving the converted audio in a mp3 file named
145+
# # welcome
146+
# myobj.save("javafeatures.mp3")
147+
#
148+
# # Playing the converted file
149+
# os.system("javafeatures.mp3")
150+
151+

historyofjava.mp3

126 KB
Binary file not shown.

intermediate.py

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# 1. Split the file name and extensions
2+
# import os
3+
# file=input("enter the file name and extension:")
4+
# filename,fileextension=os.path.splitext(file)
5+
# print("the file name is:" +filename)
6+
# print("the file extension is:" +fileextension)
7+
# 1.1
8+
# if fileextension==".mp3":
9+
# print("this fie is not allowed")
10+
11+
# 2. fahrenheit to centrigrade and kelvin
12+
# f=float(input("enter the fahrenheit: "))
13+
# ftoc=(f-32)*(5/9)
14+
# print(ftoc)
15+
# ftok=ftoc+273.15
16+
# print(ftok)
17+
# 2.1
18+
# celisus=float(input("enter the celisus: "))
19+
# ctof=(celisus*1.8)+32
20+
# print("the celisus to fahrenheit %.2f" % (ctof))
21+
# k = celisus + 273.15
22+
# print("the celisus to kelvin",round(k,2))
23+
24+
# 3.calculate circumference of the circle and area of the circle
25+
# import math
26+
# r=int(input("enter the radius :"))
27+
# c=2*math.pi*r
28+
# # circumference of a circle =2*pi*r
29+
# print("circumference of a circle",c)
30+
# a=2*math.pi*r*r
31+
# # area of circle =2*pi*r*r
32+
# print("area of a circle",a)
33+
#
34+
# 3.1 half the circumference and area of the circle add them both and display result
35+
# result=0.5*(c+a)
36+
# print("result of the circumference and area of circle half value is ",result)
37+
38+
# 4 to get pwd
39+
# check alpha num,
40+
# char more 8 and less than 20
41+
# pwd = input("Enter your password")# 3483803
42+
#
43+
# if(pwd.isalnum() and not pwd.isalpha() and not pwd.isdigit()):
44+
# if(len(pwd) > 8 and len(pwd) < 20):
45+
# print("Your password is okay")
46+
# else:
47+
# print("Sorry, your password is not correct, you have to enter pwd, that should be more than 8 and less than 20 char")
48+
# else:
49+
# print("Sorry, include alpha and numaric in your password")
50+
#
51+
# list=[]
52+
# s=input("Enter ")
53+
# if (len(s)>=8):
54+
# for i in s:
55+
# if i.isupper():
56+
# list.append(i)
57+
# if i.islower():
58+
# list.append(i)
59+
# if i.isdigit():
60+
# list.append(i)
61+
# if(i=='@'or i=='_'or i=='$' or i=='+'):
62+
# list.append(i)
63+
# if len(list)==len(s):
64+
# print("valid password")
65+
# else:
66+
# print("invalid password")
67+
#
68+
# 4.2
69+
# import re
70+
# p= input("Input your password ")
71+
# x = True
72+
# while x:
73+
# if (len(p)<8 or len(p)>20):
74+
# break
75+
# elif not re.search("[a-z]",p):
76+
# break
77+
# elif not re.search("[0-9]",p):
78+
# break
79+
# elif not re.search("[$#@]",p):
80+
# break
81+
# elif re.search("\s",p):
82+
# break
83+
# else:
84+
# print("Valid Password")
85+
# x=False
86+
# break
87+
#
88+
# if x:
89+
# print("Not a Valid Password")
90+
91+
# 5.1 get and remove student name
92+
# lst=[]
93+
# for i in range(10):
94+
# name=input()
95+
# lst.append(name)
96+
# print(lst)
97+
# std_name=input()
98+
# lst.remove(std_name)
99+
# print(lst)
100+
101+
#5.2 get and update student name
102+
# lst=[]
103+
# for i in range(1,11):
104+
# name=input()
105+
# lst.append(name)
106+
# print(lst)
107+
# name2=int(input())
108+
# std_name=input()
109+
# lst[name2]=std_name
110+
# print(lst)
111+
#
112+
# 6.i.update a specific key and remove dictionary values
113+
# dict={"name":"harrish","age":22,"corse":"python"}
114+
# oldkey=input("oldkey is")
115+
# newkey=input("new key is")
116+
# dict[newkey]=dict[oldkey]
117+
# del dict[oldkey]
118+
# print(dict)
119+
#
120+
# 6.ii. total length of the dictionary keys and values
121+
# dict={"name":"harrish","age":22,"corse":"python"}
122+
# print(len(dict.keys()))
123+
# print(len(dict.values()))
124+

0 commit comments

Comments
 (0)