a
This commit is contained in:
2
.idea/libraries/openjfx_javafx_base.xml
generated
2
.idea/libraries/openjfx_javafx_base.xml
generated
@@ -3,7 +3,7 @@
|
||||
<properties maven-id="org.openjfx:javafx-base:20-ea+2" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/20-ea+2/javafx-base-20-ea+2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/20-ea+2/javafx-base-20-ea+2-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/20-ea+2/javafx-base-20-ea+2-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
6
.idea/libraries/openjfx_javafx_controls.xml
generated
6
.idea/libraries/openjfx_javafx_controls.xml
generated
@@ -3,11 +3,11 @@
|
||||
<properties maven-id="org.openjfx:javafx-controls:22-ea+16" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/22-ea+16/javafx-controls-22-ea+16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/22-ea+16/javafx-controls-22-ea+16-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/22-ea+16/javafx-controls-22-ea+16-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
4
.idea/libraries/openjfx_javafx_graphics.xml
generated
4
.idea/libraries/openjfx_javafx_graphics.xml
generated
@@ -3,9 +3,9 @@
|
||||
<properties maven-id="org.openjfx:javafx-graphics:22-ea+16" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/22-ea+16/javafx-graphics-22-ea+16-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16-win.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/22-ea+16/javafx-base-22-ea+16-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StreamsTraining {
|
||||
}
|
||||
static void directFib2(){
|
||||
IntStream.rangeClosed(0, 10)
|
||||
.mapToObj(n -> fibonacciiii(n))
|
||||
.mapToObj(StreamsTraining::fibonacciiii)
|
||||
.forEach(System.out::println);
|
||||
}
|
||||
public static int fibonacciiii(int n) {
|
||||
@@ -74,7 +74,7 @@ public class StreamsTraining {
|
||||
.filter(w -> w.length() > 6)
|
||||
.forEach(System.out::println);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static long fak(long input){
|
||||
return LongStream.range(1,input+1)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package P6;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
@@ -14,6 +15,7 @@ public class Praktikum {
|
||||
var time = java.time.LocalDateTime.now();
|
||||
|
||||
Path p = Paths.get(home, "java-text.tmp");
|
||||
|
||||
try {
|
||||
if (Files.exists(p))
|
||||
Files.delete(p);
|
||||
|
||||
8
WS24_25/PyCharm/pythonProject/.idea/.gitignore
generated
vendored
Normal file
8
WS24_25/PyCharm/pythonProject/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
6
WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
7
WS24_25/PyCharm/pythonProject/.idea/misc.xml
generated
Normal file
7
WS24_25/PyCharm/pythonProject/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.12 (pythonProject)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (pythonProject)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
WS24_25/PyCharm/pythonProject/.idea/modules.xml
generated
Normal file
8
WS24_25/PyCharm/pythonProject/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/pythonProject.iml" filepath="$PROJECT_DIR$/.idea/pythonProject.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
11
WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml
generated
Normal file
11
WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.11 (pythonProject)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
WS24_25/PyCharm/pythonProject/.idea/vcs.xml
generated
Normal file
6
WS24_25/PyCharm/pythonProject/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
51
WS24_25/PyCharm/pythonProject/P1/kek.py
Normal file
51
WS24_25/PyCharm/pythonProject/P1/kek.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# def fac(x,y=2):
|
||||
# return x**y
|
||||
# list = [1,2,3]
|
||||
# list2 =[]
|
||||
# for i in range(len(list)):
|
||||
# list[i] = fac(list[i])
|
||||
# print (list)
|
||||
|
||||
|
||||
class Lecture:
|
||||
def __init__(self, title):
|
||||
"""
|
||||
Initializes a new Lecture instance with a title and an empty list of students.
|
||||
|
||||
:param title: Title of the lecture
|
||||
"""
|
||||
self.title = title
|
||||
self.students = []
|
||||
|
||||
def add_student(self, student_name):
|
||||
"""
|
||||
Adds a student to the lecture.
|
||||
|
||||
:param student_name: Name of the student to be added
|
||||
"""
|
||||
if student_name not in self.students:
|
||||
self.students.append(student_name)
|
||||
print(f"{student_name} has been added to the lecture '{self.title}'.")
|
||||
else:
|
||||
print(f"{student_name} is already enrolled in the lecture '{self.title}'.")
|
||||
|
||||
def number_of_students(self):
|
||||
"""
|
||||
Returns the number of students enrolled in the lecture.
|
||||
|
||||
:return: The count of students
|
||||
"""
|
||||
return len(self.students)
|
||||
|
||||
|
||||
# Example usage
|
||||
|
||||
# Create a new lecture
|
||||
python_lecture = Lecture("Introduction to Python")
|
||||
# Add students
|
||||
python_lecture.add_student("Alice")
|
||||
python_lecture.add_student("Bob")
|
||||
python_lecture.add_student("Alice") # Attempt to add Alice again
|
||||
|
||||
# Get the number of students
|
||||
print(f"Number of students enrolled in '{python_lecture.title}': {python_lecture.number_of_students()}")
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user