1 / 3

CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals//tutorfortune.com

CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals//tutorfortune.com<br><br>Click on below link to buy<br>https://tutorfortune.com/products/cyb-130-week-1-individual-create-a-program-using-variables-and-conditionals<br><br>CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals<br> <br><br>This programming assignment will put together everything you learned this week. You will<br><br>Create variables and assign them values.<br><br>Add the variables.<br><br>Use a conditional statement to determine an appropriate string to print.<br> <br><br>Write a program in JES that does the following:<br><br>Creates two variables: Num_1 and Num_2<br><br><br>Assigns the value 50 to Num_1 and 25 to Num_2<br><br><br>Creates a third variable Total; Total should add Num_1 and Num_2<br><br>Determines if Total is greater than 100, between 99 and 50, or less than 50<br><br>Using If, Elif, or Else statements, do the following: <br><br> <br><br>If Total is greater than 100, print a string that shows the value of Total combined with the string u201cis too highu201d<br><br><br>If Total is less than 50, print a string that shows the value of Total combined with the string u201cis too lowu201d<br><br>If Total is between 99 and 50, print a string that shows the value of Total combined with the string u201cis in the correct rangeu201d<br> <br><br>Iteration 1:<br><br>Run your program to demonstrate the output.<br><br>In this iteration with the variables you provided, the string that is output should state u201c75 is in the correct rangeu201d.<br><br>If it does not, debug the program until it outputs the correct statement.<br><br>Zip your Python .py file and submit the.zip file so the code can be validated.<br><br><br>Iteration 2:<br><br>Change the value of Num_1 to a number that will result in an output making Total too high.<br><br>Run your program to demonstrate the output.<br><br>Zip your Python .py file and submit the.zip file so the code can be validated.<br><br><br>Iteration 3:<br><br>Change the value of Num_1 to a number that will result in an output making Total too low.<br><br>Run your program to demonstrate the output.<br><br>Zip your Python .py file and submit the.zip file so the code can be validated.<br><br>Submit your assignment using the Assignment Files tab.<br>CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals<br><br>Click on below link to buy<br>https://tutorfortune.com/products/cyb-130-week-1-individual-create-a-program-using-variables-and-conditionals<br>

jimjim
Download Presentation

CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals//tutorfortune.com

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CYB 130 Week 1 Individual: Create a Program Using Variables and Conditionals//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/cyb-130-week-1-individual-create-a-program-using-variables- and-conditionals C Y B 1 3 0 We e k 1 I n d i v i d u a l : C r e a t e a P r o g r a m U s i n g V a r i a b l e s a n d C o n d i t i o n a l s   T h i s p r o g r a mmi n g a s s i g n me n t w i l l p u t t o g e t h e r e v e r y t h i n g y o u l e a r n e d t h i s w e e k . Y o u w i l l C r e a t e v a r i a b l e s a n d a s s i g n t h e m v a l u e s . A d d t h e v a r i a b l e s . U s e a c o n d i t i o n a l s t a t e me n t t o d e t e r mi n e a n a p p r o p r i a t e s t r i n g t o p r i n t .   Wr i t e   a p r o g r a m i n J E S t h a t d o e s t h e f o l l o w i n g : C r e a t e s t w o v a r i a b l e s : N u m_ 1 a n d N u m_ 2 A s s i g n s t h e v a l u e 5 0 t o N u m_ 1 a n d 2 5 t o N u m_ 2 C r e a t e s a t h i r d v a r i a b l e T o t a l ; T o t a l s h o u l d a d d N u m_ 1 a n d N u m_ 2 D e t e r mi n e s i f T o t a l i s g r e a t e r t h a n 1 0 0 , b e t w e e n 9 9 a n d 5 0 , o r l e s s t h a n 5 0 U s i n g I f , E l i f , o r E l s e s t a t e me n t s , d o t h e f o l l o w i n g :     I f T o t a l i s g r e a t e r t h a n 1 0 0 , p r i n t a s t r i n g t h a t s h o w s t h e v a l u e o f T o t a l c o mb i n e d w i t h t h e s t r i n g “ i s t o o h i g h ”

  2. I f T o t a l i s l e s s t h a n 5 0 , p r i n t a s t r i n g t h a t s h o w s t h e v a l u e o f T o t a l c o mb i n e d w i t h t h e s t r i n g “ i s t o o l o w ” I f T o t a l i s b e t w e e n 9 9 a n d 5 0 , p r i n t a s t r i n g t h a t s h o w s t h e v a l u e o f T o t a l c o mb i n e d w i t h t h e s t r i n g “ i s i n t h e c o r r e c t r a n g e ”   I t e r a t i o n 1 : R u n   y o u r p r o g r a m t o d e mo n s t r a t e t h e o u t p u t . I n t h i s i t e r a t i o n w i t h t h e v a r i a b l e s y o u p r o v i d e d , t h e s t r i n g t h a t i s o u t p u t s h o u l d s t a t e “ 7 5 i s i n t h e c o r r e c t r a n g e ” . I f i t d o e s n o t ,   d e b u g   t h e p r o g r a m u n t i l i t o u t p u t s t h e c o r r e c t s t a t e me n t . Z i p   y o u r P y t h o n . p y fi l e a n d   s u b mi t   t h e . z i p fi l e s o t h e c o d e c a n b e v a l i d a t e d . I t e r a t i o n 2 : C h a n g e   t h e v a l u e o f N u m_ 1 t o a n u mb e r t h a t w i l l r e s u l t i n a n o u t p u t ma k i n g T o t a l t o o h i g h . R u n   y o u r p r o g r a m t o d e mo n s t r a t e t h e o u t p u t . Z i p   y o u r P y t h o n . p y fi l e a n d   s u b mi t   t h e . z i p fi l e s o t h e c o d e c a n b e v a l i d a t e d . I t e r a t i o n 3 : C h a n g e   t h e v a l u e o f N u m_ 1 t o a n u mb e r t h a t w i l l r e s u l t i n a n o u t p u t ma k i n g T o t a l t o o l o w . R u n   y o u r p r o g r a m t o d e mo n s t r a t e t h e o u t p u t . Z i p   y o u r P y t h o n . p y fi l e a n d   s u b mi t   t h e . z i p fi l e s o t h e c o d e c a n b e v a l i d a t e d . S u b mi t   y o u r a s s i g n me n t u s i n g t h e A s s i g n me n t F i l e s t a b .

  3. C Y B 1 3 0 We e k 1 I n d i v i d u a l : C r e a t e a P r o g r a m U s i n g V a r i a b l e s a n d C o n d i t i o n a l s Click on below link to buy https://tutorfortune.com/products/cyb-130-week-1-individual-create-a-program-using-variables- and-conditionals

More Related