Computer Science- Programming

?

Programming

Python Output

To output somthing you use the command "print" - print ("Hello!")

Input Command

input("Enter the password")

If you want to add the input to a variable: 

Password=input("Enter the password")

Then you can output the variable:

Password=input("Enter the password")

print("Your new password is", Password)

Assign a value

You can assign an integer- password= int(input("..."))

or a string- Name = "Alison"

or a float number (fraction)- float(input("..."))

Calculated operations

+ - * /

Python if...

==- equal to

!= - not equal to

< - less than

> - more than

If - logical test- colon (:)

if age < 15: (after the colon there always is an indentation)

    print ("Sorry you cant come back")

else:

    print("You can buy a ticket")

If there are more than 2 options you can use "elif"

if- elif-elif-elif-else 

Repetition

Counter controlled: the computer counts how many times the loop repeats- you can use this…

Comments

whartondanielle5

Report

A high-level programming language whose main idea is simple readability and syntax that allows programmers to express the concept of a program in a couple of lines of code. You can learn python using courses. Now i buy programming homework and take courses at the same time. Thus, if you have problems with matlab homework, then you can turn to [url=https://bookwormhub.com/matlab-homework.html]bookwormhub.com[/url] professionals. I think that when i complete the programming course, i will be able to do my homework on my own.
Russell

Report

Hello, are there any students here who are learning programming? If you haven't started the problem yet and need general help or an explanation of programming concepts, feel free to ask questions. I am willing to help you understand the basics of programming or provide you with general information on how to solve problems.