Module 1 Introduction to Programming Exam

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What did Python users nickname Guido Van Rossum?

"Benevolent Dictator For Life" because as code founder, he still has the final say in all Python disputes.

What languages is Python?

Interpreted and High-Level

Printing with Python

Printing can easily go awry and not display correctly, especially when printing a string value versus a string literal. If you don't print it, they won't see it

What happens once the user responds?

The computer will capture the answer and assign it to the variable.

Programming in 1968-1969

The development of Pascal pushed programming into a new era—past general calculations and into a more sophisticated and structured approach

Bugs Happen

The more mistakes and errors you make when coding, the more opportunities you'll have to practice and learn what can go wrong. While the goal is to eventually get it right, getting it wrong a few times is what will eventually get you there.

What is software?

the term we use to describe the interface between you and the computer Programmers actually write new software with existing software

Strings

A sequence of letters, numbers, spaces, and symbols or alphanumeric information. It could be a single letter, a word, or even a phrase. You must put them in quotation marks.

Python

General-purpose programming language. Often used as a first language to learn programming. Used for web applications, software development.

Good and Bad examples for Camelcase

Good Example- newCar Bad Example- newcar

Good and Bad example for Use Nouns

Good Example-newCar Bad Example- driveSoFastNewCar

Good and Bad example for Reasonable lenghth

Good Example-newCar Bad Example- newCarThatIWantWhenIFinallyGraduate

What popular websites use Python?

Google, Yahoo, and YouTube

Who developed Python in 1991?

Guido Van Rossum

Healthcare

Patient Portals Robotic Surgery 3D printed prosthetics

Java

Popular programming language named for the amount of coffee the programmers drank while developing the language in 1995

What do Programmers refer to their errors as?

Programmers refer to their errors as "bugs", and one of their jobs is to fix bugs. This process is called - you guessed it - debugging.

What does Programming look like Today?

Programmers today work in every industry imaginable. There are thousands of different programming languages today, all developed to meet different needs. Mobile devices and constant need to access information, means a higher demand for smarter and more complex programs.

How many categories are there to Programming Language?

Two Categories

Concatenating Strings

Two or more strings can be combined to form one big string. This process is called concatenation. We use the plus symbol (+) to make this happen.

Gatekeepers

Writing and owning a program Involves testing debugging, and resolving an issues for the user

What is a Slice?

a portion of a string

Pseudocode

an outline of your code that goes through the easy-to-understand, human language. which means false or fake code. As you begin to write longer code, you'll want to create a plan so you don't get lost. To do this, outline your code in plain ole' English to help you structure the code you will write.

Interactive

programs that prompt the user for a response

String Literal

A string within quotation marks.Python will print literally what you type, no matter what.

What is Camelcase?

A style convention for naming variables, functions, and methods, in which the first letter of a name appears in lowercase and the first letters of any subsequent words or phrases are capitalized.

Can I Be A Computer Programmer?

Anybody can be

What did Programming look like in 1957?

As computers got more advanced, so did programming. Programmers developed new languages so they could translate commands into binary, or machine code, so computers could understand.

What did Programming look like in 1968-1969?

As programming became more sophisticated, the demand for programmers increased. More languages meant more opportunities for programmers to create new technology.

What languages is Java?

Compiled and High-Level

Programming in 1842

Programming existed on paper

Grace Hopper

(1906 - 1992). Most Likely to Coin a Term Much deserving of this title, Grace is credited for popularizing the term "debugging" as well as "compiler" (she also created the first compiler). She is also known as "Amazing Grace" for her obvious contributions to programming, as well as her work as a U.S. Navy Rear Admiral.

Who did Guido Van Rossum name his program after?

A British Comedian group Monty Python.

Meaningful name

Always use meaningful names to avoid confusion. The names should also be self-explanatory.

Programming Today

Gaming, hacking, and developing code are part of our everyday world. Everyone around you is either building or interacting with programming on a daily basis.

Python's Naming Rules for Variables - Do's

Begin variable names with a letter or underscore. After the first letter, the variable name may contain additional letters or digits, 0 to 9.

What are Interpreted and Compiled Languages?

Both High Levels and can be translate high level to that a computer can understand

Technology

Building social media sites Talking smart cars

Troubleshooting Tips

Check your spelling and capitalization - Python is case sensitive! Check your punctuation - Is there a quote or parenthesis missing? Check your spacing - Python expects blocks of code to be spaced properly. Look out for those indentations. Check before and after - Sometimes the error is hiding in the line above or below. Talk it out - Read the code out loud to yourself. Really! It should read like a (really weird) story. Once you say it out loud, your ears may hear the bug.

What languages is C?

Compiled and High-Level

What languages is Fortran?

Compiled and High-Level

Inventors

Creations help power every industry in the world Create programs that solve problems sometimes from scratch.

Output

Describe your desired output

Fortran (Formula Translation)

Designed in 1954 at IBM Mainly used for calculations on large computers Still used in weather forecasting, but for the most part, obsolete

Military

Develop drones Maintain operational security Develop cutting-edge technology

Visionaries

Don't just do one and move one Try to make it better and expand

What did Programming look like in 1946?

Early on, a programmer's job involved physically turning gears, flipping switches, or attaching wires on huge machines for each new task. It was labor intensive and prone to errors.

Entertainment

Films Video Games Concerts

Programming in 1957

Fortran. It is still in use today. The language has evolved to perform highly advanced calculations, and it is both fast and effective at completing tasks.

What Jobs can programmers do?

Healthcare,Education,Military,Technology,Entertainment,Agriculture,Construction

What does High Level mean?

Human Language in to machine language.

Assignment Statement

In this you tell Python, "This variable is assigned this string value."

Assigning String Values in Python

Instead of storing it in your human memory, you can store information in your computer's memory using Python. This is called assigning a string value to a variable. To assign a string value to a variable in Python, follow this example. movieTitle = "Live. Die. Repeat." This line of Python code is an example of an assignment statement.

Print Function

Is used any time you want your program to display something to the screen. It's pretty straightforward: use it + what you want to see, and presto!

What happens when you add an input statement to your code?

It will make the computer print your prompt to the screen and wait for the user to answer.

What is a Post Mortem Review?

It's a short, written statement that evaluates how the project went, reflecting on what went well and how the program could be improved.

Slicing Strings

It's more likely you'll want to pull out multiple letters from a string. This can be a fun way to display "hidden" messages as you learn to code.If you put two index values in square brackets, you can take a slice out of a string.

Who developed Fortran?

John Backus language at IBM

Reasonable length

Keep variable names to this.

Character Index

Let's say you want to pull out one specific character from the string. You will need the index position of that character. Notice that Python starts counting the index position of each letter with the number 0 instead of the number 1. That's important to remember!

Naming Variables

Like most things in life, there are both rules and good practices to keep in mind when you're naming variables in Python. Rules: These make sure Python can process your instructions correctly. Good Practices: These just make your life easier.

What are the two categories to the Programming Language?

Low Level and High Level

What kind of Languages represents Assembly Language and Machine Language?

Low-Level

Programming in 1981

MS-DOS was released, allowing people around the world to use the early operating system for their personal computers. Windows hadn't been created yet, so there were no folder icons or other images to click on. Pulling up files on a PC in the 1980s meant typing in commands to direct the computer to the correct location.

What does Low Level mean?

Machine Code

What was The Electronic Numerical Integrator and Computer (ENIAC) designed for?

Military Use

Construction

Mock up buildings Map out land

Use Nouns

Name variables with nouns, not verbs

Who designed Pascal?

Niklaus Wirth designed the famous programming language, Pascal, in his thirties.

Who was the first President to write Code?

Obama

Education

Online Classes

Getting User Input

Python has a built in function called input(). This allows programmers to create interactive statements to ask users for information.

What Do Programmers Do?

Solve problems with their code

Programming in 1946

The Electronic Numerical Integrator and Computer (ENIAC)

What do professional programmers devolep as a strong habit for success early on?

The Post Mortem Review (PMR).

What did Programming look like in 1981?

The era of the "personal computer" brought programming into the commercial world. Programs were written so end users could type simple commands to open, close, and run applications. A computer programmer's job expanded from developing specialized programs for specific purposes, to building software for everyday users.

Can you fix bugs as you go?

The good news is you can fix bugs as you go. The computer will even help point many of them out.

C

The name for the 1972 language came from an earlier language called B It is the second-most popular language, and is used in computer game development, cross-platform programming, and more

What should print always be followed by?

The parentheses(). Inside the parentheses, you can type anything you want Python to print. Be careful, though! If you forget the quotes when printing a string literal, the computer will be confused.

Where Did Programming Come From

The reality of programming was realized when Ada wrote an algorithm to compute numbers in 1842

Syntax Errors

These are the easiest and most common errors. It occurs when you've broken a programming language rule. Written languages have rules, such as spelling, grammar, and punctuation. Programming languages have rules for their structure, too. In Python, the quotation marks and parentheses are required syntax to print a string literal. If you forget to use them, the computer won't know what to do.

Runtime Errors

These happen when you run the program. Usually this means there's a problem with a value, and the computer can't finish doing what you requested. An example would be division by 0. The computer doesn't know how to do that any better than your math teacher!

Logic Errors

These mean the program ran, but the results were not as expected. The program's syntax is fine, so there's no error. You have to notice these problems on your own by checking to see what happens when you run the program. If you didn't get what you expected, then you have to go back through to code to figure out why! These are also called semantic errors, and they can be pretty tricky to fix.

Researcher

They constantly seek out to improve their skills and share ideas

Guido Van Rossum

This Dutch programmer wrote Python and earns the title of Class Clown.

Machine Language

This language uses a series of 1s and 0s to communicate with the computer. It can be hard for humans to understand and write.

Fluent

Thousands of programming languages each with different rules and meant for a different purpose Might be fluent in a few

In order to get in put what must the program do?

To get input, the program must prompt the user. That's why you provide a string literal prompt like "Enter your name." or "Do you like Oreos?" to give the user some instructions.

What does Post Mortem Review allow programers to do?

To share lessons learned and become more efficient and effective during future projects.

Agriculture

Track and plan growth

Tips for Writing Good Pseudocode

Use it to plan out your program, start to finish. Outline your steps as clearly as possible. Use everyday words, not Python code. Use short phrases to describe the steps (ex. Input firstName, lastName). All pseudocode will look slightly different. Make sure to review and make changes as necessary.

Assembly Language

Uses letters and numbers to represent machine language

Python's Naming Rules for Variables - Dont's

Variable names may not be of any of Python's keywords. Variable names may not contain spaces Variable names may not contain punctuation symbols.

Description of Camelcase

When a variable name contains two or more recognizable words or phrases, such as movieTitle or newCar, programmers use the camelcase style convention. Notice the first letter is lowercase and the first letter of each word after is capitalized.

Is it one of the most powerful jobs in the world?

Yes

What can you do with enough of input/output codes?

You can design a simple conversation for a program to have with another user, similar to a chatbot.

String Operations

You can perform different operations on string values such as concatenation, indexing, and slicing to get new string values!

What is a Chatbot?

a computer program that simulates a conversation between a person and a computer

Ada Lovelace

known as the world's first computer programmer

Good and Bad example for Meaningful names

newCar Bad Example- dsadsadasdas

Electronic Numerical Integrator and Computer

was the first electronic, general-purpose computer. It had over 17,000 vacuum tubes, and its creators nicknamed it the "Giant Brain."

What is Java used in?

web applications, network programming, Android devices, etc.

Input

what you want to ask the user use everyday language, but include any functions you'll use to help you plan. Include any commands or important components that will make your program function correctly.

Who Are Programmers?

write code that translates commands to binary code so computers can understand them.


Set pelajaran terkait

La letra H siempre se escribe con una variedad de prefijos

View Set

Earth, Moon, and Sun: Earth in Space

View Set

Module 3: Learning and Development

View Set