# there is no such data type thing that you have to declare in Python


# You may not see this line in programming.



"""

whatever I input between two set of three quotes, it would be not printed on screen. It is just ignored.

"""


"""

adfasfafdasdfasdfasdfasdfasdf

"""


# code after "#" would be ignored too

# asdfasdfasdfas

# asdfasdfasdfasdf

## asdfasdfasdfasdf


-------------

#Now let us expect what this programming code print out !

print(" We are learning Python ! ")

# print("We are having fun ! ")

"""

print("We would like to drink ")

"""

-------------

Q. What code above will print out ?

Answer : We are learning Python ! 


#Have a nice day everybody. (this is a single line comment)

"""

asdf

""" ( we call it multi-line comment)


'Study > Python' 카테고리의 다른 글

Hello World Python !  (0) 2018.10.06

print(Hello World ! Python ! )


s = "Hello World Python ! ")


print("{ }".format(s))



Unlike other programming languages, Python does not require semicolon and specific data type declaration. Python has a lot more easier tools than any other programming languages. The biggest good point of Python is it is free and fast.

We have just learned how to use print in Python. Hope to see you again at my blog anytime you want ! FAIR ENOUGH. See you again.

'Study > Python' 카테고리의 다른 글

[Python] comment  (0) 2018.10.06

import java.util.Scanner;


public class Tax{

  public static void main(String[] args){

    int tax_commission = 1500;

    Scanner input = new Scanner(system.in);

    System.out.print("What do you do for your living? : ");

    String job = input.nextString();

    System.out.print("How much you get paid per month? : ");

    int salary = input.nextInt();

    

    System.out.println("Since your job is  " + job + " and get paid like " + salary +" this much, the tax you have pay for this year is : " + (commission + salary * 0.13) );

  }

}



import java.util.Scanner;
public class Car{

  

  int speedlimit;

  String color;


  public void toString(){

    System.out.println("my car color is : " + color + " and speed limit is : " + speedlimit );

  }

  public void int setSpeedLimit(int speedlimit){

    this.speedlimit = speedlimit;

  }

  public void getSpeedLimit(){

    return speed;

  }

  public void string setColor(String color){

    this.color = color;

  }

  public void getColor(){

    return color;

  }

  

  public static void main(String[] args){

    Scanner input = new Scanner(System.in);

    

    String color;

    int speedlimit;

    color = input.nextString();

    speedlimit = input.nextInt();

    

    setSpeedLimit(speedlimit);

    getSpeedLimit();

    

    setColor(color);

    getColor();

    toString();

  }

}

[Java Programming] Java return, 자바 리턴값 배우기


[Person.java]


class Person{

String name = "Lin";

String bloodType;

int age = 20;


void speak(){

System.out.println("저의 이름은"+name+"이고 혈액형은"+bloodType+"입니다.");

}

String getName(){

return name;

}


int getAge(){

return age;

}

}


[Application.java]


public class Application{

public static void main(String[] agrs){

Person person1 = new Person();

String myName = person1.getName();

int myAge = person1.getAge() + 6;

System.out.println(myAge);

}

}


[result]

26

+ Recent posts