Questions Uploads

Final Project Review

1-3 Final Project Review – IT-140->
B Module One – MAT-140-T3281 P x
C
Codio – Loops
https://codio.com/dlopez7/loops:5c1711cbab68f03457dca422:ylR3oRlv7A6p/tree/challenges%2F0-N.py
0
Codio
Project
File
Edit
while py
Find
View
O-N.py
Tools
Education
Help
Configure…."
Project Index (static)
Q
GO
Configure….
# Get N from the command line
import sys
3. 1. Count fr…
DLOPEZ7
N = int (sys. argv[1])
NOUAWNH
# This is a ‘ counter’ variable.
Collapse Challenges
while N <= 3:
print (N)
# If the condition is true, it loops back
N = N + 1
3. 1. Count from 0 to N
# Your code goes here
We will pass in a value, N. You should write a program that
outputs all values from O up to an including N.
Check It!
LAST RUN on 1/7/2019. 2:01:26 AM
X
Program Output
Program Failed for Input: – 1

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Final Project Review

B 1-3 Final Project Review – IT-140 x
By 1-1 Discussion Intro to Scripting
X A ALEKS – Dametres Lopez – Home X
C
Codio – Conditional Statements
+
https://codio.com/dlopez7/conditional-statements:5c1711cbab68f03457dca422:oPvfU9le7qLW/tree/challenges%2Ffast-cars1.py
C
Codio
Project
Find
View
Tools
Q
Education
Help
2GO
fast-cars1.py
Configure….
Project Index (static)
Configure…
3. 2. Fast car…
DLOPEZ7
import
# Get our car speeds from the command line
speed1
Collapse Logical Operators
speed2
= int (sys . argv[1])
= int (sys. argv[2])
# Write your code below
3. 2. Fast car’s 1
– co a
if speed1 or speed2 |>70:
print( ‘ fast cars’ )
else:
print ( ‘ok’ )
You are provided with 2 input values which determine the
speed of 2 cars.
If either car is travelling at more than 70 then output fast cars
Otherwise output ‘ok’.
Check It!
AST RUN on 1/6/2019. 6.38 02 PM
Program Output
File "fast-cars1.py", line 8
if speed1 or speed2 => 70
SyntaxError: invalid syntax
There is an error is your program
70% (8:20)
Python
O Type here to search
e
6:38 PM
1/6/2019Read more

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Codio – Numeric and String Expre x

BI
Homepage – Southern New Ham
Codio – Numeric and String Expre x
https://codio.com/dlopez7/numeric-and-string-expressions:5c1711cbab68f03457dca422:KxGhUkEjGJW6/tree/challenges%2Ffix1.py
Codio
Pro
File
Edit
Find
View
Tools
fix1.py
Education
Help
Node version
Project Index (static)
AGO
8
Configure….
4. 1. Fix chall…
DLOPEZ7
# Input from the command line
import sys
name= sys . argv[1]
Collapse )Fixing Errors
# Your code goes here
newString = ‘Hello, ‘
str (newString)
4. 1. Fix challenge 1
str (name)

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Numeric and String Expro

Tome – >> Students
C Codio – Numeric and String Expro
https://codio.com/dlopez7/numeric-and-string-expressions:5c1711cbab68f03457dca422:KxGhUkEjGJW6/tree/challenges%2Fstrnum.py
Codio
Project
File
Edit
Find
View
Tools
Education
Help
Node version
is Project Index (static)
Configure….
um.py
3. 4. Strings c…
# Input from the command line
converted to an integer
Collapse
String expressions
import sys
number1 = int (sys . argv[1] )
number2 = int(sys . argv[2] )
B. 4. Strings containing numbers
N= number1
N2= number2
should join them together into a single string
str ( "N’ N2")
print (N+ N2
Tip: if you simply add these numbers together, they
# Your
code
will be added together as numbers, not a string. You
have already seen how to make sure they are added
together as strings. can you remember?
Check It!
Program Output
Program Failed for Input: 123 456
Expected Output: 123456
Your Program Output: 579
Your output was incorrect. Tr

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"