quiz.py

Flow Chart 

unnamed.jpg

Pseudocode 

Create variables for users name and number of answers correct

Ask user for their name

Introduce program

 

Ask a question and provide 4 choices

Check if the user imputed an integer and if not repeat the question.

Check if the user imputed a number 1-4 and if not repeat the question.

Check if the answer is correct and if it is then go onto next question

Count score

Check if the answer is incorrect and if it is then go onto the next question.

Count score

 

Check score and display score

Display a message for the score.

 

Version 1 

I wrote out the first question to make sure that everything worked first. 

screen-shot-2017-01-20-at-3-33-10-pm

 

Version 2 

I wrote out all of the questions and I got them all to work. 

screen-shot-2017-01-20-at-4-03-42-pm

Version 3  

Here I added a place where the user can type their name and also I provided a intro for the program. 

screen-shot-2017-01-20-at-4-23-37-pm

Version 4 

This is the ending of the program 

 

screen-shot-2017-01-20-at-4-47-39-pm

 

 

 

Advertisements

aliens.py Part 2

TEAM NAME: JIV 

aliens.py part 1 code 

aliensjiv01

Flowchart 

flowChart.jpg

aliens.py Part 2 pseudocode

Create variables for aliens landed on earth and amount of weeks
Tell user purpose of program
Ask user how many aliens landed on Earth
Check if user gave positive integer and if not repeat question
Ask user how long the aliens been on Earth (weeks)
Check if user gave positive integer and if not repeat questions
Use math equation to determine and display the alien population on earth each week.

aliens.py Part 2 code

screen-shot-2017-01-18-at-9-27-02-am 

 

hourly.py

# hourlyJO.py by Jesenya Olivas

# Initialize variables
name = str(“Jesenya”)
job = str(“lawyer”)
wage = float(“273.41”)
shift = int(11)
# Intro to self
print(“Hello, my name is”, name, “and I am a”, job,”.” )
print(“I make”, wage, “an hour and I work an”, shift,”shift.” )
# Counter (1 hour)
for i in range(shift):
# 1 hour
if i == 0:
print(“After”, i+1,”hour, I make”, wage,”.”)

# 2+ hours
else:
print(“After”, i+1, “hours, I make”, round(wage*(i+1), 2),”.”)