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 not shown.
Empty file.
Binary file added .gradle/7.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file added .gradle/7.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/7.1/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/7.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/7.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file added .gradle/7.1/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Oct 19 15:30:28 AST 2021
gradle.version=7.1
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Binary file added .gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file added .gradle/checksums/sha1-checksums.bin
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
1 change: 1 addition & 0 deletions .idea/.name

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

2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

4 changes: 4 additions & 0 deletions .idea/gradle.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

Binary file not shown.
Binary file added out/production/classes/MainKt.class
Binary file not shown.
Binary file added out/production/classes/PonuseCh10Kt.class
Binary file not shown.
27 changes: 23 additions & 4 deletions src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
fun main(args: Array<String>) {
//Q1 :
fun main() {
var mymap= mutableMapOf("student" to "Raghad" ,"student2" to "Rola","student3" to "maha" )
println(mymap)
mymap.putIfAbsent("student4" , "Afrah")
println(mymap)
mymap["student3"] ="mashail"
println(mymap)
mymap.remove(key= "student")
println(mymap)


println("print your name")
//========================================================

}
//Q2 :
var Cities= mutableMapOf("Cities" to "Riyad" ,"Cities2" to "jeddah","Cities3" to "yanbu" )
println(Cities)
Cities.putAll(listOf("abha","damam","almadina").mapIndexed{ index, s ->index.toString() to s })
println(Cities)


/*val numbersMap = mutableMapOf("one" to 1, "two" to 2, "three" to 3) // anathor suliton
numbersMap.putAll(listOf("four" to 4, "five" to 5))
println(numbersMap)*/

}
21 changes: 21 additions & 0 deletions src/main/kotlin/ponuseCh10.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

//Q " Bonus , Nestd Loop "

//In the first time, when the value of i is 1 the content of the outer for loop is executed (that is, the lines from line 3 to line 6),
// then the inner for loop starts working, in which the value of [ is set to 1, while the i is 1 as mentioned earlier,
// it is executed The content of this inner for loop is printing 5 * j, and since the value of j is 1, it will print 5 * 1,
// then the inner for loop will finish and then line 6 will be executed under which a new line is printed... ) like this

fun main() {

val number = 5
for (i in 1..number){

for (j in 1..i) {

print("$j*5 ")

}
println()
}
}