Skip to content

pgkm93/PythonBasicControlStructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

*** Control Structures in Python***

Tutedude Assignment 2

Task - 1

checking if a numbers is Even or odd

  1. In the program i took number as a variables and assigned user input to that variable.
  2. Here the user given input (means number)is divided by 2 == to "0" .
  3. if this condition is true that number will be even otherwise it's odd numbers.

Task - 2

Sum of Integers from 1 to 50 using a loop

  1. Initialize an accumulator variable for the sum.
  2. Use a for loop to iterate over numbers from 1 to 50 (inclusive)
  3. Display the final sum (outside the loop to print only once)

Thank you

About

Control Structures in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages