Coder Social home page Coder Social logo

osvaldobm's Projects

aplicacion icon aplicacion

fun main() { println("Bienvenido a Uber") val name:String="Osvaldo" println(name) val edad: Int = 23 println("Mi edad es $edad") println("Usuario $name,$edad años") fun verifyAge(){ println("Ingresa la edad y da enter") val age = readLine()?.toInt()//?significa que puede ser nulo y la función debe detenerse when { age!! >18 -> { println("Ya eres mayor de edad") } age==18 -> { println("Acabas de cumplir 18") } else -> { println("Eres menor de edad") } } } val isLegal: Boolean = edad>=18 println("¿El usuario es mayor de edad? $isLegal") val usuario= "[email protected]" val password="contraseña1" /* val correctpas: Boolean = when password String && when password int println("La contraseña es corecta $correctpas") when (password){ is String -> println("Has ingresasdo carácteres alfabéticos") else in 0..9-> println("Has ingresado carácteres numéricos")}*/ /* fun login(user: String, password: String): Boolean { fun validate(input: String): Boolean { if(input.isEmpty()){ return false } return true } val userValidated = validate(user) val passValidate = validate(password) return userValidated && passValidate } fun loggedIn(userid: String, pass:String): Boolean{ var loggedIn = false return loggedIn }A*/ val resultado = login(user,pass) fun login(user: String, pass: String): Boolean{ if(user==usuario && pass==password){ println("Inicio de sesión exitoso") return true } else{ println("email o contraseña incorrecto") return false }} fun crearSaludo(name: String): String{return "Hola$name"} println(crearSaludo(name)) fun elegirPais(country:String){ when(country){ "México" ->{ val idioma = "Español" val divisa = "Peso" println("Bienvenido a Bedu shop") } "Francia" -> { val idioma = "Francés" val divisa = "Euro" println("Soyez Bienvenu à Bedu shop") } "Estados Unidos" -> { val idioma = "Inglés" val divisa = "Dolar" println("Welcome to Bedu shop") } else ->{ println("Lo sentimos, este servicio no está disponible en tu país") } }} val usuarios = mapOf( "[email protected]" to "Azc", "[email protected]" to "Cliente43", "[email protected]" to "F3R2472" ); }

taller-github-r icon taller-github-r

Este es el primer repositorio del Taller para aprender a conectar GitHub con R

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.