Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .gradle/7.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/libraries/KotlinJavaRuntime.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions HW_week2_dat3_map/HW_week2_dat3_map.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
46 changes: 45 additions & 1 deletion src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
fun main(args: Array<String>) {
//part|
var mapLamia = mutableMapOf<String,String>(
"In1" to "Lamia" , "In2" to "Omar" , "In3" to "Huda" , "In4" to "Shayam" )
println(mapLamia)
//ADD
mapLamia.put("In5" , "Ghaida")
println(mapLamia)
//EDIT
mapLamia["In4"]="Maryam"
println(mapLamia)
//remove
mapLamia.remove("In5")
println(mapLamia)

println("----------------------------------")

//part||
var mapList = mutableMapOf<String,String>(
"Inst1" to "Kotlin" , "Inst2" to "Java" , "Inst3" to "C++")
println(mapList)
mapList.putAll(listOf("Swift", "PHP" , "Python").mapIndexed({x, y -> x.toString() to y }))
println(mapList)

println("-------------------------------")


var i = 5
var j = 1

for(i in j..i){
for(j in j..i) {
print(" - 1 X $j ")

}
println()
j=+1 }

println("--------------")
var i1 = 5
var j1 = 1
for(i1 in j1..i1){
for(j1 in j1..i1) {
print("$i1 X $j1 - ") }

println()
j1=+1 }

// your code here



Expand Down