Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homework_1 - Баландин Игорь #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
66 changes: 66 additions & 0 deletions homeworks/homework_1/task_1/console-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
F:\Programming\Github\OOP\naumen.scala.course.2020.spring>scala
Welcome to Scala 2.12.10 (Java HotSpot(TM) 64-Bit Server VM, Java 11.0.8).
Type in expressions for evaluation. Or try :help.

scala> val a = "Hello Scala! This is Igor"
a: String = Hello Scala! This is Igor

scala> val Hellos = List("Привет","Hola")
Hellos: List[String] = List(╧ЁштхЄ, Hola)

scala> val Hellos = List("Privet", "Hola")
Hellos: List[String] = List(Privet, Hola)

scala> Hellos.map(x=> println(s"$x Scala! This is Igor")
|
|
You typed two blank lines. Starting a new command.

scala>

scala> Hellos.map(x=> println(s"$x Scala! This is Igor")
|
|
You typed two blank lines. Starting a new command.

scala> println(a)
Hello Scala! This is Igor

scala> Hellos.map(x=> println(s"$x Scala! This is Igor")
| wtf
| wtf
| how to print it
|
|
You typed two blank lines. Starting a new command.

scala> Hellos.map(x=> println(s"$x Scala! This is Igor"))
Privet Scala! This is Igor
Hola Scala! This is Igor
res1: List[Unit] = List((), ())

scala> val name = "Igor"
name: String = Igor

scala> Hellos.map(x=> println(s"$x Scala! This is name.reverse()"))
Privet Scala! This is name.reverse()
Hola Scala! This is name.reverse()
res2: List[Unit] = List((), ())

scala> Hellos.map(x=> println(s"$x Scala! This is {name.reverse()}"))
Privet Scala! This is {name.reverse()}
Hola Scala! This is {name.reverse()}
res3: List[Unit] = List((), ())

scala> Hellos.map(x=> println(s"$x Scala! This is ${name.reverse()}"))
<console>:14: error: not enough arguments for method apply: (index: Int)Char in class StringOps.
Unspecified value parameter index.
Hellos.map(x=> println(s"$x Scala! This is ${name.reverse()}"))
^

scala> Hellos.map(x=> println(s"$x Scala! This is ${name.reverse}"))
Privet Scala! This is rogI
Hola Scala! This is rogI
res5: List[Unit] = List((), ())

scala>
1 change: 1 addition & 0 deletions homeworks/homework_1/task_2/scastie-url.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://scastie.scala-lang.org/B5jOUA0ZSkmuo13X8Ensxw