Section 1

Preview this deck

for

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (13)

Section 1

(13 cards)

for

Front

A loop controlled by a counter

Back

def

Front

Create a function that can be used repeatedly (like a shortcut)

Back

E-commerce

Front

Any transaction that occurs online involving buying or selling. This can happen through social media, the internet, etc

Back

input

Front

Data provided by the user

Back

Explain this code- # Import the modules import sys import random ans = True while ans: question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ") answers = random.randint(1,8) if question == "": sys.exit() elif answers == 1: print "It is certain" elif answers == 2: print "Outlook good" elif answers == 3: print "You may rely on it" elif answers == 4: print "Ask again later" elif answers == 5: print "Concentrate and ask again" elif answers == 6: print "Reply hazy, try again" elif answers == 7: print "My reply is no" elif answers == 8: print "My sources say no"

Front

As long as the ans is true it will print "Ask the magic 8 ball a question: (press enter to quit) " It will then create a random number between 1-8. using the "if" statement, if the user doesn't input anything to answer the question, the numbers will not have an effect. "else if" - so if they do input something - it will give a specific answer depending on the number.

Back

'print is not defined'

Front

used a capital letter instead of lower case P instead of correct p

Back

while

Front

A loop controlled by a decision

Back

B2C What is it Examples

Front

"Business to customer" Any E-commerce where the transaction occurs directly between the business and the customer. The customer buys the product directly from the business. eg Amazon or Zulily

Back

Programming

Front

Writing code to solve a problem

Back

Print

Front

Output a message on the screen

Back

Invalid syntax

Front

No speech marks used or missing speech mark on one side

Back

P2P What is it Examples

Front

"Peer two peer" Any E-commerce buying something directly to each other without a third party/ use of a company business. eg Buying something from an auction site (like Ebay) or Uber

Back

if... else

Front

A decision

Back